[PATCH] D82547: [Debugify] Expose original debug info preservation check as CC1 option

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 23 08:04:19 PDT 2021


djtodoro added inline comments.


================
Comment at: clang/include/clang/Driver/Options.td:4872
+               "optimizations.">;
+def fverify_debuginfo_preserve_export
+    : Joined<["-"], "fverify-debuginfo-preserve-export=">,
----------------
jansvoboda11 wrote:
> Please, update the new options to use the marshalling infrastructure. You can then remove the code from `CompilerInvocation`.
> 
> https://clang.llvm.org/docs/InternalsManual.html#adding-new-command-line-option
Sure. Thanks!


================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:1644-1650
+  Opts.EnableDIPreservationVerify = Args.hasArg(OPT_fverify_debuginfo_preserve);
+  // Ignore the option if the -fverify-debuginfo-preserve wasn't enabled.
+  if (Opts.EnableDIPreservationVerify &&
+      Args.hasArg(OPT_fverify_debuginfo_preserve_export)) {
+    Opts.DIBugsReportFilePath = std::string(
+        Args.getLastArgValue(OPT_fverify_debuginfo_preserve_export));
+  }
----------------
StephenTozer wrote:
> Any particular behaviour if the user specifies a file for `-fverify-debuginfo-preserve-export` but doesn't set `-fverify-debuginfo-preserve`? It seems like it would be worth emitting a warning in this case, though I'm not sure if that's an established precedent.
it makes sense


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

https://reviews.llvm.org/D82547



More information about the llvm-commits mailing list