Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/bolt
diff options
context:
space:
mode:
authorAmir Ayupov <aaupov@fb.com>2022-04-15 16:13:19 +0300
committerAmir Ayupov <aaupov@fb.com>2022-04-15 16:33:14 +0300
commit4f277f28ab88bb96c8da1da96dda11bab17a3da7 (patch)
tree2e320b01745f429e44099c7929a1346887fb9388 /bolt
parent57a4f9bd493bca0dc78b16951c7d3f3fadfbc2f2 (diff)
[BOLT] Check if LLVM_REVISION is defined
Handle the case where LLVM_REVISION is undefined (due to LLVM_APPEND_VC_REV=OFF or otherwise) by setting "<unknown>" value as before D123549. Reviewed By: yota9 Differential Revision: https://reviews.llvm.org/D123852
Diffstat (limited to 'bolt')
-rw-r--r--bolt/lib/Utils/CommandLineOpts.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/bolt/lib/Utils/CommandLineOpts.cpp b/bolt/lib/Utils/CommandLineOpts.cpp
index 6aa1b777e4a7..cdf75ac686a4 100644
--- a/bolt/lib/Utils/CommandLineOpts.cpp
+++ b/bolt/lib/Utils/CommandLineOpts.cpp
@@ -17,7 +17,12 @@ using namespace llvm;
namespace llvm {
namespace bolt {
-const char *BoltRevision = LLVM_REVISION;
+const char *BoltRevision =
+#ifdef LLVM_REVISION
+ LLVM_REVISION;
+#else
+ "<unknown>";
+#endif
}
}