DebugInfo: Assume valid pointer in DISubprogram::replaceFunction()

Other accessors assume this already; not sure how `replaceFunction()`
got left behind.

llvm-svn: 234782
This commit is contained in:
Duncan P. N. Exon Smith 2015-04-13 19:41:30 +00:00
parent e8c4d44b5f
commit 55aa9652c3

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