From: Chris Lattner Date: Sun, 29 Feb 2004 19:02:26 +0000 (+0000) Subject: Do not use explicit casts that hide the dependence on Instruction being X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e85f2348c9b49f8339899be6936fde33559bdc5f;p=oota-llvm.git Do not use explicit casts that hide the dependence on Instruction being annotable git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12000 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/CodeGen/MachineCodeForInstruction.h b/include/llvm/CodeGen/MachineCodeForInstruction.h index 9a08de79afa..bc457f39579 100644 --- a/include/llvm/CodeGen/MachineCodeForInstruction.h +++ b/include/llvm/CodeGen/MachineCodeForInstruction.h @@ -45,14 +45,8 @@ public: MachineCodeForInstruction() : Annotation(MCFI_AID), callArgsDesc(NULL) {} ~MachineCodeForInstruction(); - static MachineCodeForInstruction &get(const Instruction *I) { - assert(I != NULL); - return *(MachineCodeForInstruction*) - ((Annotable*)I)->getOrCreateAnnotation(MCFI_AID); - } - static void destroy(const Instruction *I) { - ((Annotable*)I)->deleteAnnotation(MCFI_AID); - } + static MachineCodeForInstruction &get(const Instruction *I); + static void destroy(const Instruction *I); // Access to underlying machine instructions... typedef std::vector::iterator iterator; diff --git a/lib/Target/SparcV9/MachineCodeForInstruction.h b/lib/Target/SparcV9/MachineCodeForInstruction.h index 9a08de79afa..bc457f39579 100644 --- a/lib/Target/SparcV9/MachineCodeForInstruction.h +++ b/lib/Target/SparcV9/MachineCodeForInstruction.h @@ -45,14 +45,8 @@ public: MachineCodeForInstruction() : Annotation(MCFI_AID), callArgsDesc(NULL) {} ~MachineCodeForInstruction(); - static MachineCodeForInstruction &get(const Instruction *I) { - assert(I != NULL); - return *(MachineCodeForInstruction*) - ((Annotable*)I)->getOrCreateAnnotation(MCFI_AID); - } - static void destroy(const Instruction *I) { - ((Annotable*)I)->deleteAnnotation(MCFI_AID); - } + static MachineCodeForInstruction &get(const Instruction *I); + static void destroy(const Instruction *I); // Access to underlying machine instructions... typedef std::vector::iterator iterator;