[PATCH] D25434: Generate more debug info in -gmlt

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 9 11:42:26 PST 2017


dblaikie added a comment.

Hmm - maybe this shouldn't be a TargetOptions flag?

Should this be module flag (passed through metadata) so that with LTO object files individual preferences are respected? (some may request this extra info, some may not)



================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1187
   // Under -gmlt, skip building the subprogram if there are no inlined
-  // subroutines inside it.
-  if (TheCU.getCUNode()->getEmissionKind() == DICompileUnit::LineTablesOnly &&
+  // subroutines inside it. But with -fprofile-debug, the subprogram is still
+  // needed as we need its source location.
----------------
Out of date comment (refers to previous possible name for the flag)


================
Comment at: lib/CodeGen/AsmPrinter/DwarfUnit.cpp:1182
                                           bool Minimal) {
-  if (!Minimal)
+  // If -fprofile-debug is enabled, need to emit the subprogram and its source
+  // location.
----------------
Another out of date comment


================
Comment at: lib/CodeGen/AsmPrinter/DwarfUnit.cpp:1182-1184
+  // If -fprofile-debug is enabled, need to emit the subprogram and its source
+  // location.
+  if (Asm->TM.Options.DebugInfoForProfiling || !Minimal)
----------------
dblaikie wrote:
> Another out of date comment
Can this "DebugInfoForProfiling" check be floated up to the caller? (rename the 'Minimal' flag parameter to something more descriptive for the behavior change that applies to both debug-info-for-profiling and otherwise?)


https://reviews.llvm.org/D25434





More information about the llvm-commits mailing list