[codegen] Fix one more case where `getGlobalDecl` should be used. NFC.

- After https://reviews.llvm.org/D68578, the implicit conversion from
  `FunctionDecl` to `GlobalDecl` needs replacing with `getGlobalDecl`;
  otherwise, assertion is triggered.
This commit is contained in:
Michael Liao 2020-03-17 17:37:59 -04:00
parent 9a65d683e0
commit a2920c4ea9
1 changed files with 2 additions and 1 deletions

View File

@ -3833,7 +3833,8 @@ void CGDebugInfo::EmitFuncDeclForCallSite(llvm::CallBase *CallOrInvoke,
// create the one describing the function in order to have complete // create the one describing the function in order to have complete
// call site debug info. // call site debug info.
if (!CalleeDecl->isStatic() && !CalleeDecl->isInlined()) if (!CalleeDecl->isStatic() && !CalleeDecl->isInlined())
EmitFunctionDecl(CalleeDecl, CalleeDecl->getLocation(), CalleeType, Func); EmitFunctionDecl(CGM.getGlobalDecl(CalleeDecl), CalleeDecl->getLocation(),
CalleeType, Func);
} }
void CGDebugInfo::EmitInlineFunctionStart(CGBuilderTy &Builder, GlobalDecl GD) { void CGDebugInfo::EmitInlineFunctionStart(CGBuilderTy &Builder, GlobalDecl GD) {