This revision was automatically updated to reflect the committed changes. thakis marked an inline comment as done. Closed by commit rG3950e1be8d6e: [clang] Remove CLANG_ROUND_TRIP_CC1_ARGS and always roundtrip in +assert builds (authored by thakis). Herald added a project: clang.
Changed prior to commit: https://reviews.llvm.org/D114120?vs=388024&id=388166#toc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114120/new/ https://reviews.llvm.org/D114120 Files: clang/CMakeLists.txt clang/lib/Frontend/CompilerInvocation.cpp Index: clang/lib/Frontend/CompilerInvocation.cpp =================================================================== --- clang/lib/Frontend/CompilerInvocation.cpp +++ clang/lib/Frontend/CompilerInvocation.cpp @@ -612,9 +612,8 @@ CompilerInvocation::StringAllocator)>; // May perform round-trip of command line arguments. By default, the round-trip -// is enabled if CLANG_ROUND_TRIP_CC1_ARGS was defined during build. This can be -// overwritten at run-time via the "-round-trip-args" and "-no-round-trip-args" -// command line flags. +// is enabled in assert builds. This can be overwritten at run-time via the +// "-round-trip-args" and "-no-round-trip-args" command line flags. // During round-trip, the command line arguments are parsed into a dummy // instance of CompilerInvocation which is used to generate the command line // arguments again. The real CompilerInvocation instance is then created by @@ -624,8 +623,7 @@ CompilerInvocation &DummyInvocation, ArrayRef<const char *> CommandLineArgs, DiagnosticsEngine &Diags, const char *Argv0) { - // FIXME: Switch to '#ifndef NDEBUG' when possible. -#ifdef CLANG_ROUND_TRIP_CC1_ARGS +#ifndef NDEBUG bool DoRoundTripDefault = true; #else bool DoRoundTripDefault = false; Index: clang/CMakeLists.txt =================================================================== --- clang/CMakeLists.txt +++ clang/CMakeLists.txt @@ -462,9 +462,6 @@ option(CLANG_ENABLE_PROTO_FUZZER "Build Clang protobuf fuzzer." OFF) -option(CLANG_ROUND_TRIP_CC1_ARGS - "Round-trip command line arguments in -cc1." ${LLVM_ENABLE_ASSERTIONS}) - if(NOT CLANG_ENABLE_STATIC_ANALYZER AND CLANG_ENABLE_ARCMT) message(FATAL_ERROR "Cannot disable static analyzer while enabling ARCMT or Z3") endif() @@ -473,10 +470,6 @@ set(CLANG_ENABLE_OBJC_REWRITER ON) endif() -if (CLANG_ROUND_TRIP_CC1_ARGS) - add_definitions(-DCLANG_ROUND_TRIP_CC1_ARGS=ON) -endif() - # Clang version information set(CLANG_EXECUTABLE_VERSION "${CLANG_VERSION_MAJOR}" CACHE STRING
Index: clang/lib/Frontend/CompilerInvocation.cpp =================================================================== --- clang/lib/Frontend/CompilerInvocation.cpp +++ clang/lib/Frontend/CompilerInvocation.cpp @@ -612,9 +612,8 @@ CompilerInvocation::StringAllocator)>; // May perform round-trip of command line arguments. By default, the round-trip -// is enabled if CLANG_ROUND_TRIP_CC1_ARGS was defined during build. This can be -// overwritten at run-time via the "-round-trip-args" and "-no-round-trip-args" -// command line flags. +// is enabled in assert builds. This can be overwritten at run-time via the +// "-round-trip-args" and "-no-round-trip-args" command line flags. // During round-trip, the command line arguments are parsed into a dummy // instance of CompilerInvocation which is used to generate the command line // arguments again. The real CompilerInvocation instance is then created by @@ -624,8 +623,7 @@ CompilerInvocation &DummyInvocation, ArrayRef<const char *> CommandLineArgs, DiagnosticsEngine &Diags, const char *Argv0) { - // FIXME: Switch to '#ifndef NDEBUG' when possible. -#ifdef CLANG_ROUND_TRIP_CC1_ARGS +#ifndef NDEBUG bool DoRoundTripDefault = true; #else bool DoRoundTripDefault = false; Index: clang/CMakeLists.txt =================================================================== --- clang/CMakeLists.txt +++ clang/CMakeLists.txt @@ -462,9 +462,6 @@ option(CLANG_ENABLE_PROTO_FUZZER "Build Clang protobuf fuzzer." OFF) -option(CLANG_ROUND_TRIP_CC1_ARGS - "Round-trip command line arguments in -cc1." ${LLVM_ENABLE_ASSERTIONS}) - if(NOT CLANG_ENABLE_STATIC_ANALYZER AND CLANG_ENABLE_ARCMT) message(FATAL_ERROR "Cannot disable static analyzer while enabling ARCMT or Z3") endif() @@ -473,10 +470,6 @@ set(CLANG_ENABLE_OBJC_REWRITER ON) endif() -if (CLANG_ROUND_TRIP_CC1_ARGS) - add_definitions(-DCLANG_ROUND_TRIP_CC1_ARGS=ON) -endif() - # Clang version information set(CLANG_EXECUTABLE_VERSION "${CLANG_VERSION_MAJOR}" CACHE STRING
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits