Move -fnext-runtime defaulting to driver (and change clang-cc default to
-fnext-runtime), instead of using getDefaultLangOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89058 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/Basic/LangOptions.h b/include/clang/Basic/LangOptions.h
index a0720a7..7fd57c0 100644
--- a/include/clang/Basic/LangOptions.h
+++ b/include/clang/Basic/LangOptions.h
@@ -126,7 +126,8 @@
     ObjCConstantStringClass = 0;
     C99 = Microsoft = CPlusPlus = CPlusPlus0x = 0;
     CXXOperatorNames = PascalStrings = WritableStrings = 0;
-    Exceptions = NeXTRuntime = Freestanding = NoBuiltin = 0;
+    Exceptions = Freestanding = NoBuiltin = 0;
+    NeXTRuntime = 1;
     Rtti = 1;
     LaxVectorConversions = 1;
     HeinousExtensions = 0;
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index 6c58d0d..3a4d115 100644
--- a/lib/Basic/Targets.cpp
+++ b/lib/Basic/Targets.cpp
@@ -158,8 +158,6 @@
 /// GetDarwinLanguageOptions - Set the default language options for darwin.
 static void GetDarwinLanguageOptions(LangOptions &Opts,
                                      const llvm::Triple &Triple) {
-  Opts.NeXTRuntime = true;
-
   unsigned MajorVersion = Triple.getDarwinMajorNumber();
 
   // Blocks and stack protectors default to on for 10.6 (darwin10) and beyond.
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 1eec2f2..bc6ad14 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -887,9 +887,7 @@
   Args.AddLastArg(CmdArgs, options::OPT_femit_all_decls);
   Args.AddLastArg(CmdArgs, options::OPT_ffreestanding);
   Args.AddLastArg(CmdArgs, options::OPT_fheinous_gnu_extensions);
-  Args.AddLastArg(CmdArgs, options::OPT_fgnu_runtime);
   Args.AddLastArg(CmdArgs, options::OPT_flax_vector_conversions);
-  Args.AddLastArg(CmdArgs, options::OPT_fnext_runtime);
   Args.AddLastArg(CmdArgs, options::OPT_fno_caret_diagnostics);
   Args.AddLastArg(CmdArgs, options::OPT_fno_show_column);
   Args.AddLastArg(CmdArgs, options::OPT_fobjc_gc_only);
@@ -955,6 +953,12 @@
                    getToolChain().getTriple().getOS() == llvm::Triple::Win32))
     CmdArgs.push_back("-fms-extensions");
 
+  // -fnext-runtime is default.
+  if (!Args.hasFlag(options::OPT_fnext_runtime,
+                    options::OPT_fgnu_runtime,
+                    getToolChain().getTriple().getOS() == llvm::Triple::Darwin))
+    CmdArgs.push_back("-fgnu-runtime");
+
   // -fshort-wchar default varies depending on platform; only
   // pass if specified.
   if (Arg *A = Args.getLastArg(options::OPT_fshort_wchar)) {
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index c8e52fe..3537bc5 100644
--- a/lib/Frontend/CompilerInvocation.cpp
+++ b/lib/Frontend/CompilerInvocation.cpp
@@ -396,7 +396,8 @@
   Res.push_back(Opts.Exceptions ? "1" : "0");
   Res.push_back("-frtti");
   Res.push_back(Opts.Rtti ? "1" : "0");
-  Res.push_back(Opts.NeXTRuntime ? "-fnext-runtime" : "-fgnu-runtime");
+  if (!Opts.NeXTRuntime)
+    Res.push_back("-fgnu-runtime");
   if (Opts.Freestanding)
     Res.push_back("-ffreestanding");
   if (Opts.NoBuiltin)
diff --git a/test/CodeGenObjC/bitfield-1.m b/test/CodeGenObjC/bitfield-1.m
index 8ccbf4e..3f605eb 100644
--- a/test/CodeGenObjC/bitfield-1.m
+++ b/test/CodeGenObjC/bitfield-1.m
@@ -1,5 +1,5 @@
-// RUN: clang-cc -triple x86_64-apple-darwin9 -fnext-runtime -emit-llvm -o %t %s
-// RUN: clang-cc -triple i386-apple-darwin9 -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -triple x86_64-apple-darwin9 -emit-llvm -o %t %s
+// RUN: clang-cc -triple i386-apple-darwin9 -emit-llvm -o %t %s
 // RUN: clang-cc -triple i386-pc-linux-gnu -emit-llvm -o %t %s
 
 @interface Object
diff --git a/test/CodeGenObjC/bitfield-ivar-metadata.m b/test/CodeGenObjC/bitfield-ivar-metadata.m
index 542a242..f720bcc 100644
--- a/test/CodeGenObjC/bitfield-ivar-metadata.m
+++ b/test/CodeGenObjC/bitfield-ivar-metadata.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -emit-llvm -o %t %s
 
 @interface INTF
 {
diff --git a/test/CodeGenObjC/category-super-class-meth.m b/test/CodeGenObjC/category-super-class-meth.m
index 95d8b31..ce27e87 100644
--- a/test/CodeGenObjC/category-super-class-meth.m
+++ b/test/CodeGenObjC/category-super-class-meth.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -emit-llvm -o %t %s
 
 @interface BASE
 + (int) BaseMeth;
diff --git a/test/CodeGenObjC/class-getter-dotsyntax.m b/test/CodeGenObjC/class-getter-dotsyntax.m
index 3c82f78..1e1a759 100644
--- a/test/CodeGenObjC/class-getter-dotsyntax.m
+++ b/test/CodeGenObjC/class-getter-dotsyntax.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -emit-llvm -o %t %s
 
 @interface Test { }
 + (Test *)crash;
diff --git a/test/CodeGenObjC/constant-strings.m b/test/CodeGenObjC/constant-strings.m
index 84786c0..8482376 100644
--- a/test/CodeGenObjC/constant-strings.m
+++ b/test/CodeGenObjC/constant-strings.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -emit-llvm -o %t %s
 // RUN: clang-cc -fgnu-runtime -emit-llvm -o %t %s && grep NXConstantString %t | count 1
 // RUN: clang-cc -fgnu-runtime -fconstant-string-class=NSConstantString -emit-llvm -o %t %s && grep NSConstantString %t | count 1
 
diff --git a/test/CodeGenObjC/continuation-class.m b/test/CodeGenObjC/continuation-class.m
index 925f3cd..305d6c7 100644
--- a/test/CodeGenObjC/continuation-class.m
+++ b/test/CodeGenObjC/continuation-class.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fnext-runtime --emit-llvm -o %t %s
+// RUN: clang-cc --emit-llvm -o %t %s
 
 @interface Object
 - (id)new;
diff --git a/test/CodeGenObjC/dot-syntax-1.m b/test/CodeGenObjC/dot-syntax-1.m
index 6c4dcbb..491ea0a 100644
--- a/test/CodeGenObjC/dot-syntax-1.m
+++ b/test/CodeGenObjC/dot-syntax-1.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fnext-runtime --emit-llvm -o %t %s
+// RUN: clang-cc --emit-llvm -o %t %s
 
 #include <stdio.h>
 
diff --git a/test/CodeGenObjC/dot-syntax.m b/test/CodeGenObjC/dot-syntax.m
index 68c8ad0..bd61a6a 100644
--- a/test/CodeGenObjC/dot-syntax.m
+++ b/test/CodeGenObjC/dot-syntax.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fnext-runtime --emit-llvm -o %t %s
+// RUN: clang-cc --emit-llvm -o %t %s
 
 #include <stdio.h>
 
diff --git a/test/CodeGenObjC/encode-test-1.m b/test/CodeGenObjC/encode-test-1.m
index 9338455..8e6fd86 100644
--- a/test/CodeGenObjC/encode-test-1.m
+++ b/test/CodeGenObjC/encode-test-1.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -triple=i686-apple-darwin9 -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -triple=i686-apple-darwin9 -emit-llvm -o %t %s
 // RUN: grep -e "{Base=b2b3b4b5}" %t | count 1
 // RUN: grep -e "{Derived=b2b3b4b5b5b4b3}" %t | count 1
 
diff --git a/test/CodeGenObjC/encode-test-2.m b/test/CodeGenObjC/encode-test-2.m
index 9e3291c..b53ea66 100644
--- a/test/CodeGenObjC/encode-test-2.m
+++ b/test/CodeGenObjC/encode-test-2.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -triple=i686-apple-darwin9 -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -triple=i686-apple-darwin9 -emit-llvm -o %t %s
 // RUN: grep -e "@\\\22<X>\\\22" %t
 // RUN: grep -e "@\\\22<X><Y>\\\22" %t
 // RUN: grep -e "@\\\22<X><Y><Z>\\\22" %t
diff --git a/test/CodeGenObjC/encode-test-3.m b/test/CodeGenObjC/encode-test-3.m
index 78540d1..79a024f 100644
--- a/test/CodeGenObjC/encode-test-3.m
+++ b/test/CodeGenObjC/encode-test-3.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -triple=i686-apple-darwin9 -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -triple=i686-apple-darwin9 -emit-llvm -o %t %s
 // RUN: grep -e "\^i" %t | count 1
 // RUN: grep -e "\[0i\]" %t | count 1
 
diff --git a/test/CodeGenObjC/encode-test-5.m b/test/CodeGenObjC/encode-test-5.m
index ca94ad0..d5ec9b3 100644
--- a/test/CodeGenObjC/encode-test-5.m
+++ b/test/CodeGenObjC/encode-test-5.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -triple=x86_64-apple-darwin9 -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -triple=x86_64-apple-darwin9 -emit-llvm -o %t %s
 
 // RUN: grep ji.00 %t | count 1
 char *a = @encode(_Complex int);
diff --git a/test/CodeGenObjC/encode-test.m b/test/CodeGenObjC/encode-test.m
index dd658c6..6665cb9 100644
--- a/test/CodeGenObjC/encode-test.m
+++ b/test/CodeGenObjC/encode-test.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -triple=i686-apple-darwin9 -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -triple=i686-apple-darwin9 -emit-llvm -o %t %s
 // RUN: grep -e "\^{Innermost=CC}" %t | count 1
 // RUN: grep -e "{Derived=#ib32b8b3b8sb16b8b8b2b8ccb6}" %t | count 1
 // RUN: grep -e "{B1=#@c}" %t | count 1
diff --git a/test/CodeGenObjC/hidden.m b/test/CodeGenObjC/hidden.m
index 6b86ca0..fd87d99 100644
--- a/test/CodeGenObjC/hidden.m
+++ b/test/CodeGenObjC/hidden.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fnext-runtime --emit-llvm -o %t %s
+// RUN: clang-cc --emit-llvm -o %t %s
 
 __attribute__((visibility("hidden")))
 @interface Hidden
diff --git a/test/CodeGenObjC/link-errors.m b/test/CodeGenObjC/link-errors.m
index be8df8e..4944f1b 100644
--- a/test/CodeGenObjC/link-errors.m
+++ b/test/CodeGenObjC/link-errors.m
@@ -1,8 +1,8 @@
-// RUN: clang-cc -triple i386-apple-darwin9 -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -triple i386-apple-darwin9 -emit-llvm -o %t %s
 // RUN: grep '.lazy_reference .objc_class_name_A' %t | count 1
 // RUN: grep '.lazy_reference .objc_class_name_Unknown' %t | count 1
 // RUN: grep '.lazy_reference .objc_class_name_Protocol' %t | count 1
-// RUN: clang-cc -triple i386-apple-darwin9 -DWITH_IMPL -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -triple i386-apple-darwin9 -DWITH_IMPL -emit-llvm -o %t %s
 // RUN: grep '.lazy_reference .objc_class_name_Root' %t | count 1
 
 @interface Root
diff --git a/test/CodeGenObjC/message-arrays.m b/test/CodeGenObjC/message-arrays.m
index c618672..1ae6bf6 100644
--- a/test/CodeGenObjC/message-arrays.m
+++ b/test/CodeGenObjC/message-arrays.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -emit-llvm -o %t %s
 
 void f0(id a) {
   // This should have an implicit cast
diff --git a/test/CodeGenObjC/messages-2.m b/test/CodeGenObjC/messages-2.m
index ca0eb94..02dbd01 100644
--- a/test/CodeGenObjC/messages-2.m
+++ b/test/CodeGenObjC/messages-2.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fnext-runtime --emit-llvm -o %t %s
+// RUN: clang-cc --emit-llvm -o %t %s
 
 #include <stdio.h>
 
diff --git a/test/CodeGenObjC/messages.m b/test/CodeGenObjC/messages.m
index c987bbb..ea8809f 100644
--- a/test/CodeGenObjC/messages.m
+++ b/test/CodeGenObjC/messages.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fnext-runtime --emit-llvm -o %t %s
+// RUN: clang-cc --emit-llvm -o %t %s
 // RUN: grep "objc_msgSend" %t | count 6
 // RUN: clang-cc -fgnu-runtime --emit-llvm -o %t %s
 // RUN: grep "objc_msg_lookup" %t | count 6
diff --git a/test/CodeGenObjC/newproperty-nested-synthesis-1.m b/test/CodeGenObjC/newproperty-nested-synthesis-1.m
index 5196b82..4d93198 100644
--- a/test/CodeGenObjC/newproperty-nested-synthesis-1.m
+++ b/test/CodeGenObjC/newproperty-nested-synthesis-1.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fnext-runtime --emit-llvm -o %t %s
+// RUN: clang-cc --emit-llvm -o %t %s
 
 @interface Object
 - (id) new;
diff --git a/test/CodeGenObjC/objc-gc-aggr-assign.m b/test/CodeGenObjC/objc-gc-aggr-assign.m
index d5e4caa..1646cde 100644
--- a/test/CodeGenObjC/objc-gc-aggr-assign.m
+++ b/test/CodeGenObjC/objc-gc-aggr-assign.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fnext-runtime -fobjc-gc -emit-llvm -o %t %s
+// RUN: clang-cc -fobjc-gc -emit-llvm -o %t %s
 // RUN: grep objc_memmove_collectable %t | grep call | count 3
 
 static int count;
diff --git a/test/CodeGenObjC/objc2-assign-global.m b/test/CodeGenObjC/objc2-assign-global.m
index 102e7bb..6b34796 100644
--- a/test/CodeGenObjC/objc2-assign-global.m
+++ b/test/CodeGenObjC/objc2-assign-global.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -triple x86_64-apple-darwin10 -fnext-runtime -fobjc-gc -emit-llvm -o %t %s
+// RUN: clang-cc -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o %t %s
 // RUN: grep -F '@objc_assign_global' %t  | count 26
 
 @class NSObject;
diff --git a/test/CodeGenObjC/objc2-new-gc-api-strongcast.m b/test/CodeGenObjC/objc2-new-gc-api-strongcast.m
index 2606737..b6a0c03 100644
--- a/test/CodeGenObjC/objc2-new-gc-api-strongcast.m
+++ b/test/CodeGenObjC/objc2-new-gc-api-strongcast.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -triple x86_64-apple-darwin10 -fblocks -fnext-runtime -fobjc-gc -emit-llvm -o %t %s
+// RUN: clang-cc -triple x86_64-apple-darwin10 -fblocks -fobjc-gc -emit-llvm -o %t %s
 // RUN: grep -F '@objc_assign_strongCast' %t  | count 4
 
 @interface DSATextSearch @end
diff --git a/test/CodeGenObjC/objc2-property-encode.m b/test/CodeGenObjC/objc2-property-encode.m
index 0015585..f1c1024 100644
--- a/test/CodeGenObjC/objc2-property-encode.m
+++ b/test/CodeGenObjC/objc2-property-encode.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -triple=i686-apple-darwin9 -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -triple=i686-apple-darwin9 -emit-llvm -o %t %s
 // RUN: grep -e "T@\\\\22NSString\\\\22" %t
 @interface NSString @end
 
diff --git a/test/CodeGenObjC/objc2-protocol-enc.m b/test/CodeGenObjC/objc2-protocol-enc.m
index 59a774b..2174792 100644
--- a/test/CodeGenObjC/objc2-protocol-enc.m
+++ b/test/CodeGenObjC/objc2-protocol-enc.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -triple=i686-apple-darwin9 -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -triple=i686-apple-darwin9 -emit-llvm -o %t %s
 // RUN: grep -e "T@\\\22<X>\\\22" %t
 // RUN: grep -e "T@\\\22<X><Y>\\\22" %t
 // RUN: grep -e "T@\\\22<X><Y><Z>\\\22" %t
diff --git a/test/CodeGenObjC/objc2-strong-cast.m b/test/CodeGenObjC/objc2-strong-cast.m
index d0fcb6c..73fe16a 100644
--- a/test/CodeGenObjC/objc2-strong-cast.m
+++ b/test/CodeGenObjC/objc2-strong-cast.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fnext-runtime -fobjc-gc -emit-llvm -o %t %s
+// RUN: clang-cc -fobjc-gc -emit-llvm -o %t %s
 
 @interface I {
   __attribute__((objc_gc(strong))) signed long *_documentIDs;
diff --git a/test/CodeGenObjC/objc2-weak-compare.m b/test/CodeGenObjC/objc2-weak-compare.m
index be76989..82cc558 100644
--- a/test/CodeGenObjC/objc2-weak-compare.m
+++ b/test/CodeGenObjC/objc2-weak-compare.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -triple i386-apple-darwin9 -fnext-runtime -fobjc-gc -emit-llvm -o %t %s
+// RUN: clang-cc -triple i386-apple-darwin9 -fobjc-gc -emit-llvm -o %t %s
 
 @interface PBXTarget 
 {
diff --git a/test/CodeGenObjC/objc2-write-barrier-2.m b/test/CodeGenObjC/objc2-write-barrier-2.m
index e8a227b..cdb135f 100644
--- a/test/CodeGenObjC/objc2-write-barrier-2.m
+++ b/test/CodeGenObjC/objc2-write-barrier-2.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -triple x86_64-apple-darwin10 -fnext-runtime -fobjc-gc -emit-llvm -o %t %s
+// RUN: clang-cc -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o %t %s
 // RUN: grep -F '@objc_assign_global' %t  | count 7
 // RUN: grep -F '@objc_assign_ivar' %t  | count 5
 // RUN: grep -F '@objc_assign_strongCast' %t  | count 8
diff --git a/test/CodeGenObjC/objc2-write-barrier.m b/test/CodeGenObjC/objc2-write-barrier.m
index 9a5416d..bff6d8f 100644
--- a/test/CodeGenObjC/objc2-write-barrier.m
+++ b/test/CodeGenObjC/objc2-write-barrier.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -triple x86_64-apple-darwin10 -fnext-runtime -fobjc-gc -emit-llvm -o %t %s
+// RUN: clang-cc -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o %t %s
 // RUN: grep -F '@objc_assign_global' %t  | count 21
 // RUN: grep -F '@objc_assign_ivar' %t  | count 11
 
diff --git a/test/CodeGenObjC/object-incr-decr-1.m b/test/CodeGenObjC/object-incr-decr-1.m
index 53311f7..25b9698 100644
--- a/test/CodeGenObjC/object-incr-decr-1.m
+++ b/test/CodeGenObjC/object-incr-decr-1.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -triple i386-apple-darwin9 -fnext-runtime -emit-llvm %s -o %t
+// RUN: clang-cc -triple i386-apple-darwin9 -emit-llvm %s -o %t
 
 @interface Foo 
 {
diff --git a/test/CodeGenObjC/property-aggr-type.m b/test/CodeGenObjC/property-aggr-type.m
index 0cb7a5e..e2890b6 100644
--- a/test/CodeGenObjC/property-aggr-type.m
+++ b/test/CodeGenObjC/property-aggr-type.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -emit-llvm -o %t %s
 
 @interface Object
 - (id) new;
diff --git a/test/CodeGenObjC/property-agrr-getter.m b/test/CodeGenObjC/property-agrr-getter.m
index 4620579..e25429e 100644
--- a/test/CodeGenObjC/property-agrr-getter.m
+++ b/test/CodeGenObjC/property-agrr-getter.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -emit-llvm -o %t %s
 
 typedef struct {
   unsigned f0;
diff --git a/test/CodeGenObjC/property-getter-dot-syntax.m b/test/CodeGenObjC/property-getter-dot-syntax.m
index d98e9ba..c1cc5e9 100644
--- a/test/CodeGenObjC/property-getter-dot-syntax.m
+++ b/test/CodeGenObjC/property-getter-dot-syntax.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fnext-runtime --emit-llvm -o %t %s
+// RUN: clang-cc --emit-llvm -o %t %s
 
 @protocol NSObject
 - (void *)description;
diff --git a/test/CodeGenObjC/property-incr-decr-1.m b/test/CodeGenObjC/property-incr-decr-1.m
index 772e872..eb227dd 100644
--- a/test/CodeGenObjC/property-incr-decr-1.m
+++ b/test/CodeGenObjC/property-incr-decr-1.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -emit-llvm -o %t %s
 
 @interface Object
 - (id) new;
diff --git a/test/CodeGenObjC/property.m b/test/CodeGenObjC/property.m
index 264adf1..8ac44f1 100644
--- a/test/CodeGenObjC/property.m
+++ b/test/CodeGenObjC/property.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fnext-runtime --emit-llvm -o %t %s
+// RUN: clang-cc --emit-llvm -o %t %s
 
 #include <stdio.h>
 
diff --git a/test/CodeGenObjC/protocols.m b/test/CodeGenObjC/protocols.m
index 4cfb83b..c510685 100644
--- a/test/CodeGenObjC/protocols.m
+++ b/test/CodeGenObjC/protocols.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fnext-runtime -emit-llvm %s -o %t
+// RUN: clang-cc -emit-llvm %s -o %t
 
 void p(const char*, ...);
 
diff --git a/test/CodeGenObjC/runtime-fns.m b/test/CodeGenObjC/runtime-fns.m
index 9b4075a..3c6894d 100644
--- a/test/CodeGenObjC/runtime-fns.m
+++ b/test/CodeGenObjC/runtime-fns.m
@@ -1,6 +1,6 @@
-// RUN: clang-cc -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -emit-llvm -o %t %s
 // RUN: grep -e "^de.*objc_msgSend[0-9]*(" %t | count 1
-// RUN: clang-cc -DWITHDEF -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -DWITHDEF -emit-llvm -o %t %s
 // RUN: grep -e "^de.*objc_msgSend[0-9]*(" %t | count 1
 
 id objc_msgSend(int x);
diff --git a/test/CodeGenObjC/super-classmethod-category.m b/test/CodeGenObjC/super-classmethod-category.m
index 27cdbf6..033bc97 100644
--- a/test/CodeGenObjC/super-classmethod-category.m
+++ b/test/CodeGenObjC/super-classmethod-category.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -emit-llvm -o %t %s
 
 @interface SUPER
 + (void)Meth;
diff --git a/test/CodeGenObjC/unname-bf-metadata.m b/test/CodeGenObjC/unname-bf-metadata.m
index a7636e4..605d09b 100644
--- a/test/CodeGenObjC/unname-bf-metadata.m
+++ b/test/CodeGenObjC/unname-bf-metadata.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -emit-llvm -o %t %s
 // Test that meta-data for ivar lists with unnamed bitfield are generated.
 //
 @interface Foo {
diff --git a/test/CodeGenObjC/variadic-sends.m b/test/CodeGenObjC/variadic-sends.m
index c495276..e2d13e3 100644
--- a/test/CodeGenObjC/variadic-sends.m
+++ b/test/CodeGenObjC/variadic-sends.m
@@ -1,5 +1,5 @@
-// RUN: clang-cc -triple i386-unknown-unknown -fnext-runtime -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-X86-32 %s
-// RUN: clang-cc -triple x86_64-unknown-unknown -fnext-runtime -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-X86-64 %s
+// RUN: clang-cc -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-X86-32 %s
+// RUN: clang-cc -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-X86-64 %s
 
 @interface A
 -(void) im0;
diff --git a/test/Coverage/codegen-next.m b/test/Coverage/codegen-next.m
index 5486b0d..f211a59 100644
--- a/test/Coverage/codegen-next.m
+++ b/test/Coverage/codegen-next.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fnext-runtime -emit-llvm -o %t %s
-// RUN: clang-cc -g -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -emit-llvm -o %t %s
+// RUN: clang-cc -g -emit-llvm -o %t %s
 
 #include "objc-language-features.inc"
diff --git a/test/Preprocessor/init.c b/test/Preprocessor/init.c
index 6ba64e4..2926900 100644
--- a/test/Preprocessor/init.c
+++ b/test/Preprocessor/init.c
@@ -83,19 +83,15 @@
 // RUN: clang-cc -x=objective-c -E -dM < /dev/null | FileCheck -check-prefix OBJC %s
 //
 // OBJC:#define OBJC_NEW_PROPERTIES 1
+// OBJC:#define __NEXT_RUNTIME__ 1
 // OBJC:#define __OBJC__ 1
 //
-// 
+//
 // RUN: clang-cc -x=objective-c -fobjc-gc -E -dM < /dev/null | FileCheck -check-prefix OBJCGC %s
 //
 // OBJCGC:#define __OBJC_GC__ 1
 //
 // 
-// RUN: clang-cc -x=objective-c -fnext-runtime -E -dM < /dev/null | FileCheck -check-prefix NEXTRT %s
-//
-// NEXTRT:#define __NEXT_RUNTIME__ 1
-//
-// 
 // RUN: clang-cc -x=objective-c -fobjc-nonfragile-abi -E -dM < /dev/null | FileCheck -check-prefix NONFRAGILE %s
 //
 // NONFRAGILE:#define OBJC_ZEROCOST_EXCEPTIONS 1
diff --git a/tools/clang-cc/Options.cpp b/tools/clang-cc/Options.cpp
index 2dc5219..9c42167 100644
--- a/tools/clang-cc/Options.cpp
+++ b/tools/clang-cc/Options.cpp
@@ -541,11 +541,6 @@
           llvm::cl::desc("Require math functions to respect errno"));
 
 static llvm::cl::opt<bool>
-NeXTRuntime("fnext-runtime",
-            llvm::cl::desc("Generate output compatible with the NeXT "
-                           "runtime"));
-
-static llvm::cl::opt<bool>
 NoElideConstructors("fno-elide-constructors",
                     llvm::cl::desc("Disable C++ copy constructor elision"));
 
@@ -1268,9 +1263,7 @@
   Options.InstantiationDepth = TemplateDepth;
 
   // Override the default runtime if the user requested it.
-  if (NeXTRuntime)
-    Options.NeXTRuntime = 1;
-  else if (GNURuntime)
+  if (GNURuntime)
     Options.NeXTRuntime = 0;
 
   if (!ObjCConstantStringClass.empty())