[PATCH] D83702: [AIX]Generate debug info for static init related functions

Hubert Tong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 13 17:02:08 PDT 2020


hubert.reinterpretcast added inline comments.


================
Comment at: clang/lib/CodeGen/CGDeclCXX.cpp:248-250
   CGF.StartFunction(GlobalDecl(&VD, DynamicInitKind::AtExit),
-                    CGM.getContext().VoidTy, fn, FI, FunctionArgList());
+                    CGM.getContext().VoidTy, fn, FI, FunctionArgList(),
+                    VD.getLocation(), VD.getInit()->getExprLoc());
----------------
dblaikie wrote:
> Any ideas why this is only showing up for AIX & not other targets, given this code looks to be generic, not AIX-specific?
Yes, because the AIX implementation generates a direct call to the stub function on the finalization path when it finds that a stub was still registered with `atexit`.

That would explain why other platforms to not encounter this message:
```
inlinable function call in a function with debug info must have a !dbg location
```



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83702/new/

https://reviews.llvm.org/D83702





More information about the cfe-commits mailing list