From: Daniel Dunbar Date: Tue, 17 Nov 2009 07:07:28 +0000 (+0000) Subject: Move -fnext-runtime defaulting to driver (and change clang-cc default to X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c5a97ec19408c3dca4b6a6385f11d8c783b94d0b;p=clang 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 a0720a73ec..7fd57c0499 100644 --- a/include/clang/Basic/LangOptions.h +++ b/include/clang/Basic/LangOptions.h @@ -126,7 +126,8 @@ public: 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 6c58d0dcb2..3a4d115db2 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -158,8 +158,6 @@ static void getDarwinIPhoneOSDefines(std::vector &Defs, /// 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 1eec2f288e..bc6ad1413a 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -887,9 +887,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, 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 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, 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 c8e52fe7cb..3537bc58da 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -396,7 +396,8 @@ static void LangOptsToArgs(const LangOptions &Opts, 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 8ccbf4e8dd..3f605ebc4e 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 542a2424ca..f720bcc5b5 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 95d8b3103c..ce27e87bbf 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 3c82f78d08..1e1a759679 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 84786c0cdc..8482376ff9 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 925f3cd0c5..305d6c7ab3 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 6c4dcbbef0..491ea0a5a6 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 diff --git a/test/CodeGenObjC/dot-syntax.m b/test/CodeGenObjC/dot-syntax.m index 68c8ad0b75..bd61a6aaf9 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 diff --git a/test/CodeGenObjC/encode-test-1.m b/test/CodeGenObjC/encode-test-1.m index 9338455859..8e6fd861f9 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 9e3291c660..b53ea6677e 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\\\22" %t // RUN: grep -e "@\\\22\\\22" %t // RUN: grep -e "@\\\22\\\22" %t diff --git a/test/CodeGenObjC/encode-test-3.m b/test/CodeGenObjC/encode-test-3.m index 78540d1097..79a024fe1f 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 ca94ad0618..d5ec9b3909 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 dd658c6fc2..6665cb9d58 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 6b86ca0581..fd87d992aa 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 be8df8e6dc..4944f1b078 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 c618672fea..1ae6bf648c 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 ca0eb94933..02dbd01df8 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 diff --git a/test/CodeGenObjC/messages.m b/test/CodeGenObjC/messages.m index c987bbb44c..ea8809ffcd 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 5196b8244d..4d9319839d 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 d5e4caa9fb..1646cde892 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 102e7bbdc2..6b34796983 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 2606737fc6..b6a0c03ac3 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 0015585b95..f1c1024cec 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 59a774b25d..2174792bd9 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\\\22" %t // RUN: grep -e "T@\\\22\\\22" %t // RUN: grep -e "T@\\\22\\\22" %t diff --git a/test/CodeGenObjC/objc2-strong-cast.m b/test/CodeGenObjC/objc2-strong-cast.m index d0fcb6ced9..73fe16af4f 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 be769899a1..82cc558b56 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 e8a227b7f8..cdb135f015 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 9a5416d846..bff6d8fdd0 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 53311f7aa1..25b9698860 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 0cb7a5e2f4..e2890b6ee8 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 4620579693..e25429ed75 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 d98e9bab6d..c1cc5e9947 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 772e872a21..eb227dde19 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 264adf1106..8ac44f1c79 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 diff --git a/test/CodeGenObjC/protocols.m b/test/CodeGenObjC/protocols.m index 4cfb83bf00..c510685e52 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 9b4075a3b4..3c6894dddd 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 27cdbf6aed..033bc972a3 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 a7636e4ebc..605d09b033 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 c4952767fb..e2d13e3ae4 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 5486b0dfb8..f211a5914e 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 6ba64e4896..2926900e78 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 2dc521986f..9c4216749e 100644 --- a/tools/clang-cc/Options.cpp +++ b/tools/clang-cc/Options.cpp @@ -540,11 +540,6 @@ static llvm::cl::opt MathErrno("fmath-errno", llvm::cl::init(true), llvm::cl::desc("Require math functions to respect errno")); -static llvm::cl::opt -NeXTRuntime("fnext-runtime", - llvm::cl::desc("Generate output compatible with the NeXT " - "runtime")); - static llvm::cl::opt NoElideConstructors("fno-elide-constructors", llvm::cl::desc("Disable C++ copy constructor elision")); @@ -1268,9 +1263,7 @@ void clang::InitializeLangOptions(LangOptions &Options, 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())