Author: Michael Liao
Date: 2020-03-17T17:56:47-04:00
New Revision: a2920c4ea9971cc38cbca3d6e10ccb10ab83a462

URL: 
https://github.com/llvm/llvm-project/commit/a2920c4ea9971cc38cbca3d6e10ccb10ab83a462
DIFF: 
https://github.com/llvm/llvm-project/commit/a2920c4ea9971cc38cbca3d6e10ccb10ab83a462.diff

LOG: [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.

Added: 
    

Modified: 
    clang/lib/CodeGen/CGDebugInfo.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CodeGen/CGDebugInfo.cpp 
b/clang/lib/CodeGen/CGDebugInfo.cpp
index 94dab4c85614..a1ecddd3da7f 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -3833,7 +3833,8 @@ void CGDebugInfo::EmitFuncDeclForCallSite(llvm::CallBase 
*CallOrInvoke,
   // create the one describing the function in order to have complete
   // call site debug info.
   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) 
{


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to