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;
                                            ^
This commit is contained in:
Hans Wennborg 2020-10-20 17:06:35 +02:00
parent 234c47ae2a
commit 03a5f7ce12
1 changed files with 3 additions and 2 deletions

View File

@ -108,7 +108,9 @@ public:
} // namespace clang
template <> struct llvm::CfgTraitsFor<clang::CFGBlock> {
namespace llvm {
template <> struct CfgTraitsFor<clang::CFGBlock> {
using CfgTraits = clang::CfgTraits;
};
@ -116,7 +118,6 @@ template <> struct llvm::CfgTraitsFor<clang::CFGBlock> {
// which accepts an LLVM Module, so remove this (and the method's argument that
// needs it) when that is fixed.
namespace llvm {
class Module;