r199283 - Rename QA_OVERRIDE_GCC3_OPTIONS to CCC_OVERRIDE_OPTIONS. <rdar://14578381>

Bob Wilson bob.wilson at apple.com
Tue Jan 14 17:41:52 PST 2014


Author: bwilson
Date: Tue Jan 14 19:41:52 2014
New Revision: 199283

URL: http://llvm.org/viewvc/llvm-project?rev=199283&view=rev
Log:
Rename QA_OVERRIDE_GCC3_OPTIONS to CCC_OVERRIDE_OPTIONS. <rdar://14578381>

Continue to accept the old name for a while to make it an easier transition
for people who rely on this.

Modified:
    cfe/trunk/test/Driver/qa_override.c
    cfe/trunk/tools/driver/driver.cpp

Modified: cfe/trunk/test/Driver/qa_override.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/qa_override.c?rev=199283&r1=199282&r2=199283&view=diff
==============================================================================
--- cfe/trunk/test/Driver/qa_override.c (original)
+++ cfe/trunk/test/Driver/qa_override.c Tue Jan 14 19:41:52 2014
@@ -1,3 +1,5 @@
+// RUN: env CCC_OVERRIDE_OPTIONS="#+-Os +-Oz +-O +-O3 +-Oignore +a +b +c xb Xa Omagic ^-###  " %clang -target x86_64-apple-darwin %s -O2 b -O3 2>&1 | FileCheck %s
+// RUN: env CCC_OVERRIDE_OPTIONS="x-Werror +-msse" %clang -target x86_64-apple-darwin -Werror %s -c -### 2>&1 | FileCheck %s -check-prefix=RM-WERROR
 // RUN: env QA_OVERRIDE_GCC3_OPTIONS="#+-Os +-Oz +-O +-O3 +-Oignore +a +b +c xb Xa Omagic ^-###  " %clang -target x86_64-apple-darwin %s -O2 b -O3 2>&1 | FileCheck %s
 // RUN: env QA_OVERRIDE_GCC3_OPTIONS="x-Werror +-msse" %clang -target x86_64-apple-darwin -Werror %s -c -### 2>&1 | FileCheck %s -check-prefix=RM-WERROR
 
@@ -6,7 +8,7 @@
 // CHECK: "-Omagic"
 // CHECK-NOT: "-Oignore"
 
-// RM-WERROR: ### QA_OVERRIDE_GCC3_OPTIONS: x-Werror +-msse
+// RM-WERROR: ### CCC_OVERRIDE_OPTIONS: x-Werror +-msse
 // RM-WERROR-NEXT: ### Deleting argument -Werror
 // RM-WERROR-NEXT: ### Adding argument -msse at end
 // RM-WERROR-NOT: "-Werror"

Modified: cfe/trunk/tools/driver/driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/driver.cpp?rev=199283&r1=199282&r2=199283&view=diff
==============================================================================
--- cfe/trunk/tools/driver/driver.cpp (original)
+++ cfe/trunk/tools/driver/driver.cpp Tue Jan 14 19:41:52 2014
@@ -169,7 +169,7 @@ static void ApplyQAOverride(SmallVectorI
     OS = &llvm::nulls();
   }
 
-  *OS << "### QA_OVERRIDE_GCC3_OPTIONS: " << OverrideStr << "\n";
+  *OS << "### CCC_OVERRIDE_OPTIONS: " << OverrideStr << "\n";
 
   // This does not need to be efficient.
 
@@ -330,11 +330,15 @@ int main(int argc_, const char **argv_)
     }
   }
 
-  // Handle QA_OVERRIDE_GCC3_OPTIONS and CCC_ADD_ARGS, used for editing a
-  // command line behind the scenes.
-  if (const char *OverrideStr = ::getenv("QA_OVERRIDE_GCC3_OPTIONS")) {
+  // Handle CCC_OVERRIDE_OPTIONS, used for editing a command line behind the
+  // scenes. Temporarily accept the old QA_OVERRIDE_GCC3_OPTIONS name
+  // for this, to ease the transition. FIXME: Remove support for that old name
+  // after a while.
+  if (const char *OverrideStr = ::getenv("CCC_OVERRIDE_OPTIONS")) {
     // FIXME: Driver shouldn't take extra initial argument.
     ApplyQAOverride(argv, OverrideStr, SavedStrings);
+  } else if (const char *OverrideStr = ::getenv("QA_OVERRIDE_GCC3_OPTIONS")) {
+    ApplyQAOverride(argv, OverrideStr, SavedStrings);
   }
 
   std::string Path = GetExecutablePath(argv[0], CanonicalPrefixes);





More information about the cfe-commits mailing list