From: Duncan P. N. Exon Smith Date: Mon, 13 Apr 2015 19:41:30 +0000 (+0000) Subject: DebugInfo: Assume valid pointer in DISubprogram::replaceFunction() X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=eed6a11f81db8a86b3630a5e90fb072d99368f8d;p=oota-llvm.git DebugInfo: Assume valid pointer in DISubprogram::replaceFunction() Other accessors assume this already; not sure how `replaceFunction()` got left behind. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234782 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/IR/DebugInfo.h b/include/llvm/IR/DebugInfo.h index f4f6bd3ecde..69eacc7b8b1 100644 --- a/include/llvm/IR/DebugInfo.h +++ b/include/llvm/IR/DebugInfo.h @@ -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()); }