MachineBasicBlock doesn't need basicblock.h, it needs Annotation.h

llvm-svn: 4319
This commit is contained in:
Chris Lattner 2002-10-28 01:53:00 +00:00
parent 8710aab04c
commit 1861eced0e
1 changed files with 9 additions and 6 deletions

View 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;
@ -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;