aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineBasicBlock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen/MachineBasicBlock.h')
-rw-r--r--include/llvm/CodeGen/MachineBasicBlock.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h
index 62454de3fd..2904cf1ccf 100644
--- a/include/llvm/CodeGen/MachineBasicBlock.h
+++ b/include/llvm/CodeGen/MachineBasicBlock.h
@@ -7,7 +7,9 @@
#ifndef LLVM_CODEGEN_MACHINEBASICBLOCK_H
#define LLVM_CODEGEN_MACHINEBASICBLOCK_H
-#include "llvm/BasicBlock.h"
+#include "llvm/Annotation.h"
+#include <vector>
+class BasicBlock;
class MachineInstr;
extern AnnotationID MCFBB_AID;
@@ -16,7 +18,7 @@ extern AnnotationID MCFBB_AID;
class MachineBasicBlock;
typedef MachineBasicBlock MachineCodeForBasicBlock;
-class MachineBasicBlock: public Annotation {
+class MachineBasicBlock : public Annotation {
std::vector<MachineInstr*> Insts;
public:
MachineBasicBlock() : Annotation(MCFBB_AID) {}
@@ -24,12 +26,13 @@ public:
// Static methods to retrieve or destroy the MachineBasicBlock
// object for a given basic block.
- static MachineBasicBlock& get(const BasicBlock *bb) {
- return *(MachineBasicBlock*)bb->getOrCreateAnnotation(MCFBB_AID);
+ static MachineBasicBlock& get(const BasicBlock *BB) {
+ return *(MachineBasicBlock*)
+ ((Annotable*)BB)->getOrCreateAnnotation(MCFBB_AID);
}
- static void destroy(const BasicBlock *bb) {
- bb->deleteAnnotation(MCFBB_AID);
+ static void destroy(const BasicBlock *BB) {
+ ((Annotable*)BB)->deleteAnnotation(MCFBB_AID);
}
typedef std::vector<MachineInstr*>::iterator iterator;