mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
ffa0482331
llvm-svn: 4302
29 lines
844 B
C++
29 lines
844 B
C++
//===-- llvm/CodeGen/MachineCodeForBasicBlock.cpp ---------------*- C++ -*--=//
|
|
//
|
|
// Purpose:
|
|
// Collect the sequence of machine instructions for a basic block.
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
#include "llvm/CodeGen/MachineCodeForBasicBlock.h"
|
|
|
|
AnnotationID MCFBB_AID(
|
|
AnnotationManager::getID("CodeGen::MachineBasicBlock"));
|
|
|
|
static Annotation *CreateMCFBB(AnnotationID AID, const Annotable *, void *) {
|
|
assert(AID == MCFBB_AID);
|
|
return new MachineBasicBlock(); // Invoke constructor!
|
|
}
|
|
|
|
// Register the annotation with the annotation factory
|
|
static struct MCFBBInitializer {
|
|
MCFBBInitializer() {
|
|
AnnotationManager::registerAnnotationFactory(MCFBB_AID, &CreateMCFBB);
|
|
}
|
|
} RegisterCreateMCFBB;
|
|
|
|
|
|
MachineBasicBlock::MachineBasicBlock()
|
|
: Annotation(MCFBB_AID)
|
|
{}
|
|
|