Use higher level methods, don't use TargetInstrDescriptors directly!
[oota-llvm.git] / lib / Target / SparcV9 / MachineCodeForInstruction.h
index aa6ddd55ca158f0fcec86e39e54d3770da98296a..2193a80e529bcc477e7654773b649e58e61124a1 100644 (file)
@@ -35,10 +35,11 @@ public:
   
   static MachineCodeForInstruction &get(const Instruction *I) {
     assert(I != NULL);
-    return *(MachineCodeForInstruction*)I->getOrCreateAnnotation(MCFI_AID);
+    return *(MachineCodeForInstruction*)
+      ((Annotable*)I)->getOrCreateAnnotation(MCFI_AID);
   }
   static void destroy(const Instruction *I) {
-    I->deleteAnnotation(MCFI_AID);
+    ((Annotable*)I)->deleteAnnotation(MCFI_AID);
   }
 
   // Access to underlying machine instructions...