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
This commit is contained in:
Duncan P. N. Exon Smith 2015-04-13 19:41:30 +00:00
parent d4b4e3e20f
commit eed6a11f81

View File

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