From f32616e0bd5995e5e8053d4fc2b0a1da22fa68f6 Mon Sep 17 00:00:00 2001 From: John McCall Date: Wed, 16 Dec 2009 00:13:24 +0000 Subject: [PATCH] Explicit template instantiations must happen in the template's immediately 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 | 2 ++ lib/CodeGen/MachineLoopInfo.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/CodeGen/MachineDominators.cpp b/lib/CodeGen/MachineDominators.cpp index 0f796f3952c..408873903b0 100644 --- a/lib/CodeGen/MachineDominators.cpp +++ b/lib/CodeGen/MachineDominators.cpp @@ -17,8 +17,10 @@ using namespace llvm; +namespace llvm { TEMPLATE_INSTANTIATION(class DomTreeNodeBase); TEMPLATE_INSTANTIATION(class DominatorTreeBase); +} char MachineDominatorTree::ID = 0; diff --git a/lib/CodeGen/MachineLoopInfo.cpp b/lib/CodeGen/MachineLoopInfo.cpp index 63f4f18e4d5..d561a5bb8c9 100644 --- a/lib/CodeGen/MachineLoopInfo.cpp +++ b/lib/CodeGen/MachineLoopInfo.cpp @@ -19,12 +19,14 @@ #include "llvm/CodeGen/Passes.h" using namespace llvm; +namespace llvm { #define MLB class LoopBase TEMPLATE_INSTANTIATION(MLB); #undef MLB #define MLIB class LoopInfoBase TEMPLATE_INSTANTIATION(MLIB); #undef MLIB +} char MachineLoopInfo::ID = 0; static RegisterPass