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()); }