Index: llvm/trunk/include/llvm/IR/DebugInfo.h =================================================================== --- llvm/trunk/include/llvm/IR/DebugInfo.h +++ llvm/trunk/include/llvm/IR/DebugInfo.h @@ -156,6 +156,11 @@ /// dump - print descriptor to dbgs() with a newline. void dump() const; + + /// replaceAllUsesWith - Replace all uses of debug info referenced by + /// this descriptor. + void replaceAllUsesWith(LLVMContext &VMContext, DIDescriptor D); + void replaceAllUsesWith(MDNode *D); }; /// DISubrange - This is used to represent ranges, for array bounds. @@ -352,11 +357,6 @@ return (getFlags() & FlagRValueReference) != 0; } bool isValid() const { return DbgNode && isType(); } - - /// replaceAllUsesWith - Replace all uses of debug info referenced by - /// this descriptor. - void replaceAllUsesWith(LLVMContext &VMContext, DIDescriptor D); - void replaceAllUsesWith(MDNode *D); }; /// DIBasicType - A basic type, like 'int' or 'float'. Index: llvm/trunk/lib/IR/DebugInfo.cpp =================================================================== --- llvm/trunk/lib/IR/DebugInfo.cpp +++ llvm/trunk/lib/IR/DebugInfo.cpp @@ -363,7 +363,7 @@ /// replaceAllUsesWith - Replace all uses of the MDNode used by this /// type with the one in the passed descriptor. -void DIType::replaceAllUsesWith(LLVMContext &VMContext, DIDescriptor D) { +void DIDescriptor::replaceAllUsesWith(LLVMContext &VMContext, DIDescriptor D) { assert(DbgNode && "Trying to replace an unverified type!"); @@ -389,7 +389,7 @@ /// replaceAllUsesWith - Replace all uses of the MDNode used by this /// type with the one in D. -void DIType::replaceAllUsesWith(MDNode *D) { +void DIDescriptor::replaceAllUsesWith(MDNode *D) { assert(DbgNode && "Trying to replace an unverified type!"); assert(DbgNode != D && "This replacement should always happen");