[PATCH] D71817: Fix LLVM tool --version build mode printing for MSVC

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 23 10:10:57 PST 2019


rnk marked an inline comment as done.
rnk added inline comments.


================
Comment at: llvm/lib/Support/CommandLine.cpp:2439
 
+#if defined(__GNUC__)
+// GCC and GCC-compatible compilers define __OPTIMIZE__ when optimizations are
----------------
xbolva00 wrote:
> rnk wrote:
> > xbolva00 wrote:
> > > Move to compiler.h?
> > This is the only existing use of `__OPTIMIZE__` in LLVM or clang, so I would prefer to keep it local until there is another use. I hope there will never be one, it's generally not a good idea to ifdef on whether optimizations are enabled.
> Maybe you overlooked my comment but there is one more:
> 
> https://github.com/llvm/llvm-project/blob/master/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h#L99
I did, but that seems like a better candidate for `#ifdef EXPENSIVE_CHECKS`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71817





More information about the llvm-commits mailing list