[PATCH] D74871: Fix interaction between -fdiscard-value-names and LLVM Bitcode

Mehdi AMINI via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 19 18:24:42 PST 2020


mehdi_amini added a comment.

You mention a test case in the description but I don't see it?



================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:3607
+    // Cannot discard value names when processing llvm-ir, because IR loading
+    // is conservative wrt. names.
+    if (Res.getCodeGenOpts().DiscardValueNames) {
----------------
What do you mean by this?


================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:3610
+      Res.getCodeGenOpts().DiscardValueNames = false;
+    }
   } else {
----------------
nit: you don't need to test, you can always assign to false


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74871





More information about the cfe-commits mailing list