From 9bb9b737c5573cf3850230bc4db8dac7be0e1e85 Mon Sep 17 00:00:00 2001 From: Marcel Hlopko Date: Thu, 29 Oct 2020 13:01:28 -0700 Subject: [PATCH] Remove HAVE_VCS_VERSION_INC, not needed This preprocessor define was meant to be used to conditionally include VCSVersion.inc. However, the define was always set, and it was the content of the header that was conditionally generated. Therefore HAVE_VCS_VERSION_INC should be cleaned up. Reviewed By: gribozavr2, MaskRay Differential Revision: https://reviews.llvm.org/D84623 --- clang/lib/Basic/CMakeLists.txt | 3 --- clang/lib/Basic/Version.cpp | 2 -- lld/Common/CMakeLists.txt | 3 --- lld/Common/Version.cpp | 2 -- lldb/source/CMakeLists.txt | 3 --- lldb/source/lldb.cpp | 2 -- llvm/utils/gn/secondary/clang/lib/Basic/BUILD.gn | 1 - llvm/utils/gn/secondary/lld/Common/BUILD.gn | 1 - 8 files changed, 17 deletions(-) diff --git a/clang/lib/Basic/CMakeLists.txt b/clang/lib/Basic/CMakeLists.txt index dfbe74a..d259b95 100644 --- a/clang/lib/Basic/CMakeLists.txt +++ b/clang/lib/Basic/CMakeLists.txt @@ -33,9 +33,6 @@ set_source_files_properties("${version_inc}" PROPERTIES GENERATED TRUE HEADER_FILE_ONLY TRUE) -set_property(SOURCE Version.cpp APPEND PROPERTY - COMPILE_DEFINITIONS "HAVE_VCS_VERSION_INC") - add_clang_library(clangBasic Attributes.cpp Builtins.cpp diff --git a/clang/lib/Basic/Version.cpp b/clang/lib/Basic/Version.cpp index 286107c..af3118b 100644 --- a/clang/lib/Basic/Version.cpp +++ b/clang/lib/Basic/Version.cpp @@ -17,9 +17,7 @@ #include #include -#ifdef HAVE_VCS_VERSION_INC #include "VCSVersion.inc" -#endif namespace clang { diff --git a/lld/Common/CMakeLists.txt b/lld/Common/CMakeLists.txt index bfa4f7b..0437d5a 100644 --- a/lld/Common/CMakeLists.txt +++ b/lld/Common/CMakeLists.txt @@ -26,9 +26,6 @@ set_source_files_properties("${version_inc}" PROPERTIES GENERATED TRUE HEADER_FILE_ONLY TRUE) -set_property(SOURCE Version.cpp APPEND PROPERTY - COMPILE_DEFINITIONS "HAVE_VCS_VERSION_INC") - add_lld_library(lldCommon Args.cpp DWARF.cpp diff --git a/lld/Common/Version.cpp b/lld/Common/Version.cpp index cd9fcd4..f376809 100644 --- a/lld/Common/Version.cpp +++ b/lld/Common/Version.cpp @@ -12,9 +12,7 @@ #include "lld/Common/Version.h" -#ifdef HAVE_VCS_VERSION_INC #include "VCSVersion.inc" -#endif // Returns a version string, e.g.: // lld 9.0.0 (https://github.com/llvm/llvm-project.git 9efdd7ac5e914d3c9fa1ef) diff --git a/lldb/source/CMakeLists.txt b/lldb/source/CMakeLists.txt index 6dbdec5..56ea834 100644 --- a/lldb/source/CMakeLists.txt +++ b/lldb/source/CMakeLists.txt @@ -26,9 +26,6 @@ set_source_files_properties("${version_inc}" PROPERTIES GENERATED TRUE HEADER_FILE_ONLY TRUE) -set_property(SOURCE lldb.cpp APPEND PROPERTY - COMPILE_DEFINITIONS "HAVE_VCS_VERSION_INC") - list(APPEND lldbBase_SOURCES ${version_inc}) if(LLDB_VERSION_STRING) diff --git a/lldb/source/lldb.cpp b/lldb/source/lldb.cpp index 4d4c636..10fc2d7 100644 --- a/lldb/source/lldb.cpp +++ b/lldb/source/lldb.cpp @@ -13,9 +13,7 @@ using namespace lldb_private; #include "clang/Basic/Version.h" -#ifdef HAVE_VCS_VERSION_INC #include "VCSVersion.inc" -#endif static const char *GetLLDBRevision() { #ifdef LLDB_REVISION diff --git a/llvm/utils/gn/secondary/clang/lib/Basic/BUILD.gn b/llvm/utils/gn/secondary/clang/lib/Basic/BUILD.gn index 43767f1..2fe572a 100644 --- a/llvm/utils/gn/secondary/clang/lib/Basic/BUILD.gn +++ b/llvm/utils/gn/secondary/clang/lib/Basic/BUILD.gn @@ -103,5 +103,4 @@ static_library("Basic") { "XRayInstr.cpp", "XRayLists.cpp", ] - defines = [ "HAVE_VCS_VERSION_INC" ] # For Version.cpp } diff --git a/llvm/utils/gn/secondary/lld/Common/BUILD.gn b/llvm/utils/gn/secondary/lld/Common/BUILD.gn index 125cad3..d02d950 100644 --- a/llvm/utils/gn/secondary/lld/Common/BUILD.gn +++ b/llvm/utils/gn/secondary/lld/Common/BUILD.gn @@ -42,5 +42,4 @@ static_library("Common") { "Timer.cpp", "Version.cpp", ] - defines = [ "HAVE_VCS_VERSION_INC" ] # For Version.cpp } -- 2.7.4