[llvm] r234782 - DebugInfo: Assume valid pointer in DISubprogram::replaceFunction()
Duncan P. N. Exon Smith
dexonsmith at apple.com
Mon Apr 13 12:41:30 PDT 2015
Author: dexonsmith
Date: Mon Apr 13 14:41:30 2015
New Revision: 234782
URL: http://llvm.org/viewvc/llvm-project?rev=234782&view=rev
Log:
DebugInfo: Assume valid pointer in DISubprogram::replaceFunction()
Other accessors assume this already; not sure how `replaceFunction()`
got left behind.
Modified:
llvm/trunk/include/llvm/IR/DebugInfo.h
Modified: llvm/trunk/include/llvm/IR/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DebugInfo.h?rev=234782&r1=234781&r2=234782&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/IR/DebugInfo.h Mon Apr 13 14:41:30 2015
@@ -524,10 +524,7 @@ public:
Function *getFunction() const { return get()->getFunction(); }
- void replaceFunction(Function *F) {
- if (auto *N = get())
- N->replaceFunction(F);
- }
+ void replaceFunction(Function *F) { get()->replaceFunction(F); }
DIArray getTemplateParams() const {
return DIArray(get()->getTemplateParams());
}
More information about the llvm-commits
mailing list