[PATCH] D77886: [mir-strip-debug] Optionally preserve debug info that wasn't from debugify/mir-debugify

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 10 11:11:08 PDT 2020


dsanders marked 2 inline comments as done.
dsanders added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineStripDebug.cpp:30
+      if (!DebugifyMD) {
+        LLVM_DEBUG(dbgs() << "Leave debug info not from debugify\n");
+        return false;
----------------
aprantl wrote:
> `Stripping only debug info added by the debugify pass.`?
That sounds like it's stripping debug info when it's not stripping it.
`Not stripping debug info (debugify metadata not found)`?


================
Comment at: llvm/lib/CodeGen/MachineStripDebug.cpp:101
+  StripDebugMachineModule(bool OnlyDebugified = true)
+      : ModulePass(ID), OnlyDebugified(OnlyDebugified) {}
 
----------------
vsk wrote:
> I think the default value for OnlyDebugified should come from a cl::opt (e.g. -mir-strip-debugify-only=0|1). Otherwise, changing the behavior of -mir-strip-debug would require further compiler changes.
That makes sense to me


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77886





More information about the llvm-commits mailing list