aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2022-10-25 00:24:25 -0700
committerFangrui Song <i@maskray.me>2022-10-25 00:24:25 -0700
commit3a3603ff99ffd7dd7c8d166ba6d15078e33a5f71 (patch)
tree98c50f40f4b043c23d4662d4334ec58d387117a1 /clang/lib/Frontend/CompilerInstance.cpp
parente6c8418aab0bd5e459f3b286a603e5b88a4fb1a1 (diff)
downloadllvm-3a3603ff99ffd7dd7c8d166ba6d15078e33a5f71.zip
llvm-3a3603ff99ffd7dd7c8d166ba6d15078e33a5f71.tar.gz
llvm-3a3603ff99ffd7dd7c8d166ba6d15078e33a5f71.tar.bz2
[clang] Replace BACKEND_PACKAGE_STRING with LLVM_VERSION_STRING
420d7ccbac0f499a6ff9595bdbfa99cd3376df22 introduced BACKEND_PACKAGE_STRING to replace `PACKAGE_VERSION` (llvm/Config/config.h) to support standalone builds. This is used in the output of `clang -cc1 -v`. Since llvm-config.h is available for both standalone and non-standalone builds, we can just use `LLVM_VERSION_STRING` from llvm-config.h. clang/cmake/modules/AddClang.cmake uses `VERSION_STRING "${CLANG_VERSION} (${BACKEND_PACKAGE_STRING})"`. Just simplify it to `"${CLANG_VERSION}"` so that we can remove the CMake variable BACKEND_PACKAGE_STRING. Reviewed By: tstellar Differential Revision: https://reviews.llvm.org/D136660
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index 46f97e0..c28eaba8 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -41,6 +41,7 @@
#include "clang/Serialization/InMemoryModuleCache.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/ADT/Statistic.h"
+#include "llvm/Config/llvm-config.h"
#include "llvm/Support/BuryPointer.h"
#include "llvm/Support/CrashRecoveryContext.h"
#include "llvm/Support/Errc.h"
@@ -1023,9 +1024,9 @@ bool CompilerInstance::ExecuteAction(FrontendAction &Act) {
// Validate/process some options.
if (getHeaderSearchOpts().Verbose)
- OS << "clang -cc1 version " CLANG_VERSION_STRING
- << " based upon " << BACKEND_PACKAGE_STRING
- << " default target " << llvm::sys::getDefaultTargetTriple() << "\n";
+ OS << "clang -cc1 version " CLANG_VERSION_STRING << " based upon LLVM "
+ << LLVM_VERSION_STRING << " default target "
+ << llvm::sys::getDefaultTargetTriple() << "\n";
if (getCodeGenOpts().TimePasses)
createFrontendTimer();