MachineBasicBlock doesn't need basicblock.h, it needs Annotation.h
authorChris Lattner <sabre@nondot.org>
Mon, 28 Oct 2002 01:53:00 +0000 (01:53 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 28 Oct 2002 01:53:00 +0000 (01:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4319 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineBasicBlock.h

index 62454de3fd42e8ca5a3dbe7d02155c9ad0e07eff..2904cf1ccf1b5244248480da01716d0325076d68 100644 (file)
@@ -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;