diff options
author | Nico Weber <thakis@chromium.org> | 2021-11-17 16:32:33 -0500 |
---|---|---|
committer | Nico Weber <thakis@chromium.org> | 2021-11-18 08:31:21 -0500 |
commit | 3950e1be8d6ec602fda525ea20340fd3f8e2e919 (patch) | |
tree | 34c562dcabc25928170216e4597940fd20dc90c7 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 0800109d26336ac68bfc17d66b6d3087e7d68e1b (diff) | |
download | llvm-3950e1be8d6ec602fda525ea20340fd3f8e2e919.zip llvm-3950e1be8d6ec602fda525ea20340fd3f8e2e919.tar.gz llvm-3950e1be8d6ec602fda525ea20340fd3f8e2e919.tar.bz2 |
[clang] Remove CLANG_ROUND_TRIP_CC1_ARGS and always roundtrip in +assert builds
This removes the ability to disable roundtripping in assert builds.
(Roundtripping happens by default in assert builds both before and after
this patch.)
The CLANG_ROUND_TRIP_CC1_ARGS was added as an escape hatch 9 months ago
in https://reviews.llvm.org/D97462, with a FIXME to remove it eventually.
It's probably time to remove it.
Differential Revision: https://reviews.llvm.org/D114120
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 8d33a59..c104a6f 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -612,9 +612,8 @@ using GenerateFn = llvm::function_ref<void( 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 @@ static bool RoundTrip(ParseFn Parse, GenerateFn Generate, 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; |