[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineBasicBlock.h
Chris Lattner
lattner at cs.uiuc.edu
Sun Oct 27 19:54:01 PST 2002
Changes in directory llvm/include/llvm/CodeGen:
MachineBasicBlock.h updated: 1.5 -> 1.6
---
Log message:
MachineBasicBlock doesn't need basicblock.h, it needs Annotation.h
---
Diffs of the changes:
Index: llvm/include/llvm/CodeGen/MachineBasicBlock.h
diff -u llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.5 llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.6
--- llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.5 Sun Oct 27 19:21:54 2002
+++ llvm/include/llvm/CodeGen/MachineBasicBlock.h Sun Oct 27 19:53:00 2002
@@ -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 @@
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 @@
// 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;
More information about the llvm-commits
mailing list