summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-10-28 01:53:00 +0000
committerChris Lattner <sabre@nondot.org>2002-10-28 01:53:00 +0000
commit1861eced0eea58d680dae11203b5810b48ce89c4 (patch)
tree46cab3ea943b43de213594a412ebe40ee7406c6e /llvm
parent8710aab04cb4e18683bccd5594aee8acd2c747d8 (diff)
downloadbcm5719-llvm-1861eced0eea58d680dae11203b5810b48ce89c4.tar.gz
bcm5719-llvm-1861eced0eea58d680dae11203b5810b48ce89c4.zip
MachineBasicBlock doesn't need basicblock.h, it needs Annotation.h
llvm-svn: 4319
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/CodeGen/MachineBasicBlock.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineBasicBlock.h b/llvm/include/llvm/CodeGen/MachineBasicBlock.h
index 62454de3fd4..2904cf1ccf1 100644
--- a/llvm/include/llvm/CodeGen/MachineBasicBlock.h
+++ b/llvm/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;
OpenPOWER on IntegriCloud