MachineBasicBlock doesn't need basicblock.h, it needs Annotation.h
llvm-svn: 4319
This commit is contained in:
parent
8710aab04c
commit
1861eced0e
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue