Explicit template instantiations must happen in the template's immediately
authorJohn McCall <rjmccall@apple.com>
Wed, 16 Dec 2009 00:13:24 +0000 (00:13 +0000)
committerJohn McCall <rjmccall@apple.com>
Wed, 16 Dec 2009 00:13:24 +0000 (00:13 +0000)
enclosing namespace.  Caught by clang++.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91480 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MachineDominators.cpp
lib/CodeGen/MachineLoopInfo.cpp

index 0f796f3952c31402ef9edcffdb69715e8a9a062f..408873903b0d96b17ca7495a844a3fda47c424c3 100644 (file)
 
 using namespace llvm;
 
+namespace llvm {
 TEMPLATE_INSTANTIATION(class DomTreeNodeBase<MachineBasicBlock>);
 TEMPLATE_INSTANTIATION(class DominatorTreeBase<MachineBasicBlock>);
+}
 
 char MachineDominatorTree::ID = 0;
 
index 63f4f18e4d51b6629bb520b15ce6881dcbfe6305..d561a5bb8c998cc14e454bb2edeec48a725f3340 100644 (file)
 #include "llvm/CodeGen/Passes.h"
 using namespace llvm;
 
+namespace llvm {
 #define MLB class LoopBase<MachineBasicBlock, MachineLoop>
 TEMPLATE_INSTANTIATION(MLB);
 #undef MLB
 #define MLIB class LoopInfoBase<MachineBasicBlock, MachineLoop>
 TEMPLATE_INSTANTIATION(MLIB);
 #undef MLIB
+}
 
 char MachineLoopInfo::ID = 0;
 static RegisterPass<MachineLoopInfo>