[PATCH] D123852: [BOLT] Check if LLVM_REVISION is defined
Amir Ayupov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 15 06:16:30 PDT 2022
Amir created this revision.
Herald added a reviewer: rafauler.
Herald added a subscriber: ayermolo.
Herald added a reviewer: maksfb.
Herald added a project: All.
Amir requested review of this revision.
Herald added subscribers: llvm-commits, yota9.
Herald added a project: LLVM.
Handle the case where LLVM_REVISION is undefined (due to LLVM_APPEND_VC_REV=OFF
or otherwise) by setting "<unknown>" value as before D123549 <https://reviews.llvm.org/D123549>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D123852
Files:
bolt/lib/Utils/CommandLineOpts.cpp
Index: bolt/lib/Utils/CommandLineOpts.cpp
===================================================================
--- bolt/lib/Utils/CommandLineOpts.cpp
+++ bolt/lib/Utils/CommandLineOpts.cpp
@@ -17,7 +17,12 @@
namespace llvm {
namespace bolt {
-const char *BoltRevision = LLVM_REVISION;
+const char *BoltRevision =
+#ifdef LLVM_REVISION
+ LLVM_REVISION;
+#else
+ "<unknown>";
+#endif
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123852.423072.patch
Type: text/x-patch
Size: 399 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220415/a742509a/attachment.bin>
More information about the llvm-commits
mailing list