From 4f277f28ab88bb96c8da1da96dda11bab17a3da7 Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Fri, 15 Apr 2022 06:13:19 -0700 Subject: [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 "" value as before D123549. Reviewed By: yota9 Differential Revision: https://reviews.llvm.org/D123852 --- bolt/lib/Utils/CommandLineOpts.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'bolt') 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 + ""; +#endif } } -- cgit v1.2.3