Skip to content

Commit 03a5f7c

Browse files
committed
Try to make GCC5 happy about the CfgTraits thing
It was failing with: In file included from /work/llvm.monorepo/clang/lib/Analysis/Dominators.cpp:9:0: /work/llvm.monorepo/clang/include/clang/Analysis/Analyses/Dominators.h: At global scope: /work/llvm.monorepo/clang/include/clang/Analysis/Analyses/Dominators.h:111:26: error: specialization of ‘template<class CfgRelatedTypeT> struct llvm::CfgTraitsFor’ in different namespace [-fpermissive] template <> struct llvm::CfgTraitsFor<clang::CFGBlock> { ^ In file included from /work/llvm.monorepo/clang/include/clang/Analysis/Analyses/Dominators.h:21:0, from /work/llvm.monorepo/clang/lib/Analysis/Dominators.cpp:9: /work/llvm.monorepo/llvm/include/llvm/Support/CfgTraits.h:294:44: error: from definition of ‘template<class CfgRelatedTypeT> struct llvm::CfgTraitsFor’ [-fpermissive] template <typename CfgRelatedTypeT> struct CfgTraitsFor; ^
1 parent 234c47a commit 03a5f7c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

clang/include/clang/Analysis/Analyses/Dominators.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,16 @@ class CfgTraits : public llvm::CfgTraits<CfgTraitsBase, CfgTraits> {
108108

109109
} // namespace clang
110110

111-
template <> struct llvm::CfgTraitsFor<clang::CFGBlock> {
111+
namespace llvm {
112+
113+
template <> struct CfgTraitsFor<clang::CFGBlock> {
112114
using CfgTraits = clang::CfgTraits;
113115
};
114116

115117
// FIXME: There is no good reason for the domtree to require a print method
116118
// which accepts an LLVM Module, so remove this (and the method's argument that
117119
// needs it) when that is fixed.
118120

119-
namespace llvm {
120121

121122
class Module;
122123

0 commit comments

Comments
 (0)