aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r--include/llvm/CodeGen/AsmPrinter.h2
-rw-r--r--include/llvm/CodeGen/LiveIntervalAnalysis.h3
-rw-r--r--include/llvm/CodeGen/LiveVariables.h3
-rw-r--r--include/llvm/CodeGen/MachineFunctionPass.h2
-rw-r--r--include/llvm/CodeGen/MachineModuleInfo.h2
-rw-r--r--include/llvm/CodeGen/SelectionDAGISel.h4
6 files changed, 15 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/AsmPrinter.h b/include/llvm/CodeGen/AsmPrinter.h
index 024001e9d6..3a5418d937 100644
--- a/include/llvm/CodeGen/AsmPrinter.h
+++ b/include/llvm/CodeGen/AsmPrinter.h
@@ -34,6 +34,8 @@ namespace llvm {
/// AsmPrinter - This class is intended to be used as a driving class for all
/// asm writers.
class AsmPrinter : public MachineFunctionPass {
+ static const int ID;
+
/// FunctionNumber - This provides a unique ID for each function emitted in
/// this translation unit. It is autoincremented by SetupMachineFunction,
/// and can be accessed with getFunctionNumber() and
diff --git a/include/llvm/CodeGen/LiveIntervalAnalysis.h b/include/llvm/CodeGen/LiveIntervalAnalysis.h
index a42471d631..3ea0272425 100644
--- a/include/llvm/CodeGen/LiveIntervalAnalysis.h
+++ b/include/llvm/CodeGen/LiveIntervalAnalysis.h
@@ -65,6 +65,9 @@ namespace llvm {
BitVector JoinedLIs;
public:
+ static const int ID; // Pass identifcation, replacement for typeid
+ LiveIntervals() : MachineFunctionPass((intptr_t)&ID) {}
+
struct CopyRec {
MachineInstr *MI;
unsigned SrcReg, DstReg;
diff --git a/include/llvm/CodeGen/LiveVariables.h b/include/llvm/CodeGen/LiveVariables.h
index ebbe610ed0..ce377cd2cf 100644
--- a/include/llvm/CodeGen/LiveVariables.h
+++ b/include/llvm/CodeGen/LiveVariables.h
@@ -40,6 +40,9 @@ class MRegisterInfo;
class LiveVariables : public MachineFunctionPass {
public:
+ static const int ID; // Pass identifcation, replacement for typeid
+ LiveVariables() : MachineFunctionPass((intptr_t)&ID) {}
+
/// VarInfo - This represents the regions where a virtual register is live in
/// the program. We represent this with three different pieces of
/// information: the instruction that uniquely defines the value, the set of
diff --git a/include/llvm/CodeGen/MachineFunctionPass.h b/include/llvm/CodeGen/MachineFunctionPass.h
index 77af52a347..7429e7b96c 100644
--- a/include/llvm/CodeGen/MachineFunctionPass.h
+++ b/include/llvm/CodeGen/MachineFunctionPass.h
@@ -26,6 +26,8 @@ namespace llvm {
struct MachineFunctionPass : public FunctionPass {
+ MachineFunctionPass(intptr_t ID) : FunctionPass(ID) {}
+
/// runOnMachineFunction - This method must be overloaded to perform the
/// desired machine code transformation or analysis.
///
diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h
index 28201dcfdc..c23916def9 100644
--- a/include/llvm/CodeGen/MachineModuleInfo.h
+++ b/include/llvm/CodeGen/MachineModuleInfo.h
@@ -1022,6 +1022,8 @@ private:
std::vector<GlobalVariable *> TypeInfos;
public:
+ static const int ID; // Pass identifcation, replacement for typeid
+
MachineModuleInfo();
~MachineModuleInfo();
diff --git a/include/llvm/CodeGen/SelectionDAGISel.h b/include/llvm/CodeGen/SelectionDAGISel.h
index 9d5b059759..f363daf9e4 100644
--- a/include/llvm/CodeGen/SelectionDAGISel.h
+++ b/include/llvm/CodeGen/SelectionDAGISel.h
@@ -41,8 +41,10 @@ public:
MachineBasicBlock *BB;
std::vector<SDNode*> TopOrder;
unsigned DAGSize;
+ static const int ID;
- explicit SelectionDAGISel(TargetLowering &tli) : TLI(tli), DAGSize(0) {}
+ explicit SelectionDAGISel(TargetLowering &tli) :
+ FunctionPass((intptr_t)&ID), TLI(tli), DAGSize(0) {}
TargetLowering &getTargetLowering() { return TLI; }