xref: /llvm-project/llvm/lib/CodeGen/MachineBasicBlock.cpp (revision 9f99867c6c2861dfee33c5e8b9e9c08086bda2e5)
1 //===-- llvm/CodeGen/MachineCodeForBasicBlock.cpp ---------------*- C++ -*--=//
2 //
3 // Purpose:
4 //   Collect the sequence of machine instructions for a basic block.
5 //===---------------------------------------------------------------------===//
6 
7 #include "llvm/CodeGen/MachineCodeForBasicBlock.h"
8 
9 AnnotationID MCFBB_AID(
10              AnnotationManager::getID("CodeGen::MachineBasicBlock"));
11 
12 static Annotation *CreateMCFBB(AnnotationID AID, const Annotable *, void *) {
13   assert(AID == MCFBB_AID);
14   return new MachineBasicBlock();  // Invoke constructor!
15 }
16 
17 // Register the annotation with the annotation factory
18 static struct MCFBBInitializer {
19   MCFBBInitializer() {
20     AnnotationManager::registerAnnotationFactory(MCFBB_AID, &CreateMCFBB);
21   }
22 } RegisterCreateMCFBB;
23 
24 
25 MachineBasicBlock::MachineBasicBlock()
26   : Annotation(MCFBB_AID)
27 {}
28 
29