[PATCH] D42887: [Driver] Add option to manually control discarding value names in LLVM IR.

Justin Bogner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 5 13:12:05 PST 2018


bogner added inline comments.


================
Comment at: lib/Driver/ToolChains/Clang.cpp:3269-3274
+  const bool IsAssertBuild =
 #ifdef NDEBUG
-  CmdArgs.push_back("-disable-llvm-verifier");
-  // Discard LLVM value names in -asserts builds.
-  CmdArgs.push_back("-discard-value-names");
+      false;
+#else
+      true;
 #endif
----------------
It might be a few more characters, but I feel like this is more readable if you put entire statements in the branches of the #if, ie:

#ifdef NDEBUG
  const bool IsAssertBuild = false;
#else
  const bool IsAssertBuild = true;
#endif


https://reviews.llvm.org/D42887





More information about the cfe-commits mailing list