aprantl requested changes to this revision.
aprantl added a comment.
This revision now requires changes to proceed.

I don't think the implementation is correct, see inline comments.



================
Comment at: clang/include/clang/Driver/Options.td:1943
+def gno_inline_line_tables : Flag<["-"], "gno-inline-line-tables">,
+  Flags<[CC1Option, CoreOption]>, HelpText<"Don't emit inline line tables">;
 
----------------
As a DWARF person, this option name is a little confusing since in DWARF inline 
info is part of debug info, not the line table, but few end-users would 
actually know. I would probably have called it -gno-inline-info or 
-gno-inlined-functions. I don't have strong feelings about it though.


================
Comment at: llvm/docs/LangRef.rst:1437
+``"no-inline-line-tables"``
+    When this attribute is set to true, inline line tables are not generated
+    for this function if it is inlined and the location of the inlined code
----------------
Same comment for the attribute.


================
Comment at: llvm/lib/Transforms/Utils/InlineFunction.cpp:1426
+          // If we are not generating inline line tables, set the debug 
location
+          // of the inlined code to be the call site.
+          DebugLoc IDL =
----------------
This will probably cause some IR Verifier failures and very confusing debug 
info when inlining dbg.value intrinsics. The correct thing to do here is 
probably to assign line 0 to the inlined instructions and remove all debug info 
intrinsics. Otherwise the inlined variables will show up in the parent frame, 
which will screw up debugging.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67723



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

Reply via email to