[PATCH] D58559: emit '(assertions enabled)' in the version string for a build of clang with assertions enabled

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 22 18:42:41 PST 2019


arphaman updated this revision to Diff 188023.
arphaman marked an inline comment as done.
arphaman added a comment.

Use `"(+asserts)"` as suggested.


Repository:
  rC Clang

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

https://reviews.llvm.org/D58559

Files:
  lib/Basic/Version.cpp


Index: lib/Basic/Version.cpp
===================================================================
--- lib/Basic/Version.cpp
+++ lib/Basic/Version.cpp
@@ -111,6 +111,11 @@
       OS << LLVMRepo << ' ';
     OS << LLVMRev << ')';
   }
+
+  // Differentiate between the version with and without assertions.
+#ifndef NDEBUG
+  OS << " (+asserts)";
+#endif
   return OS.str();
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58559.188023.patch
Type: text/x-patch
Size: 376 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190223/f34858d0/attachment.bin>


More information about the cfe-commits mailing list