aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineCodeForInstruction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/MachineCodeForInstruction.cpp')
-rw-r--r--lib/CodeGen/MachineCodeForInstruction.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineCodeForInstruction.cpp b/lib/CodeGen/MachineCodeForInstruction.cpp
index 9d63df5bf8..75ee28878e 100644
--- a/lib/CodeGen/MachineCodeForInstruction.cpp
+++ b/lib/CodeGen/MachineCodeForInstruction.cpp
@@ -28,6 +28,15 @@
#include "llvm/Instruction.h"
using namespace llvm;
+MachineCodeForInstruction &MachineCodeForInstruction::get(const Instruction *I){
+ return *(MachineCodeForInstruction*)I->getOrCreateAnnotation(MCFI_AID);
+}
+void MachineCodeForInstruction::destroy(const Instruction *I) {
+ I->deleteAnnotation(MCFI_AID);
+}
+
+
+
AnnotationID llvm::MCFI_AID(
AnnotationManager::getID("CodeGen::MachineCodeForInstruction"));