aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-07-13 21:51:15 +0000
committerDan Gohman <gohman@apple.com>2009-07-13 21:51:15 +0000
commit42cf7cc6ace5157c359c6a5758c1d77d0cf0e236 (patch)
tree0ff6a38e33cf421026ea0232d6c47ed6f27d554d /lib/CodeGen
parentb6047e6afa3e9a628d78693c73c99716f3ae465a (diff)
downloadexternal_llvm-42cf7cc6ace5157c359c6a5758c1d77d0cf0e236.zip
external_llvm-42cf7cc6ace5157c359c6a5758c1d77d0cf0e236.tar.gz
external_llvm-42cf7cc6ace5157c359c6a5758c1d77d0cf0e236.tar.bz2
Make Loop and MachineLoop be subclasses of LoopBase, rather than typedefs,
using the Curiously Recurring Template Pattern with LoopBase. This will help further refactoring, and future functionality for Loop. Also, Headers can now foward-declare Loop, instead of pulling in LoopInfo.h or doing tricks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75519 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/MachineLoopInfo.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/CodeGen/MachineLoopInfo.cpp b/lib/CodeGen/MachineLoopInfo.cpp
index ff56f4d..a5694ae 100644
--- a/lib/CodeGen/MachineLoopInfo.cpp
+++ b/lib/CodeGen/MachineLoopInfo.cpp
@@ -19,8 +19,12 @@
#include "llvm/CodeGen/Passes.h"
using namespace llvm;
-TEMPLATE_INSTANTIATION(class LoopBase<MachineBasicBlock>);
-TEMPLATE_INSTANTIATION(class LoopInfoBase<MachineBasicBlock>);
+#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>