From aec11f1decda111112c39803cb89dace81cd0568 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 28 Oct 2002 01:53:00 +0000 Subject: [PATCH] MachineBasicBlock doesn't need basicblock.h, it needs Annotation.h git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4319 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/MachineBasicBlock.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h index 62454de3fd4..2904cf1ccf1 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 +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 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::iterator iterator; -- 2.34.1