]> granicus.if.org Git - clang/commitdiff
Removed -fobjc-newgc-api option. clang now conforms to
authorFariborz Jahanian <fjahanian@apple.com>
Mon, 21 Sep 2009 23:03:37 +0000 (23:03 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Mon, 21 Sep 2009 23:03:37 +0000 (23:03 +0000)
gcc-style write-barrier api only.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82493 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/LangOptions.h
lib/CodeGen/CGExpr.cpp
test/CodeGenObjC/objc-assign-ivar.m
test/CodeGenObjC/objc2-assign-global.m
test/CodeGenObjC/objc2-new-gc-api-strongcast.m
test/CodeGenObjC/objc2-write-barrier-2.m
test/CodeGenObjC/objc2-write-barrier.m
tools/clang-cc/clang-cc.cpp

index 1dab6154292d1333e8c33d341a9fe4498c368c12..d4d3fe50eba06b471b1402f1f5f4a6e184e2e08e 100644 (file)
@@ -88,7 +88,6 @@ public:
 
   unsigned ElideConstructors : 1; // Whether C++ copy constructors should be
                                   // elided if possible.
-  unsigned ObjCNewGCAPI : 1;      // Generate objective-c's new GC API
 private:
   unsigned GC : 2;                // Objective-C Garbage Collection modes.  We
                                   // declare this enum as unsigned because MSVC
@@ -147,7 +146,6 @@ public:
 
     OverflowChecking = 0;
     ObjCGCBitmapPrint = 0;
-    ObjCNewGCAPI = 1;
 
     InstantiationDepth = 99;
 
index 157369d7545585aa49725fadf889015e3fc41c77..2539387e96758ed067666f65f44e06cc2aedffe2 100644 (file)
@@ -691,8 +691,7 @@ void CodeGenFunction::EmitStoreThroughExtVectorComponentLValue(RValue Src,
 // or neither.
 static
 void setObjCGCLValueClass(const ASTContext &Ctx, const Expr *E, LValue &LV) {
-  if (Ctx.getLangOptions().getGCMode() == LangOptions::NonGC ||
-      !Ctx.getLangOptions().ObjCNewGCAPI)
+  if (Ctx.getLangOptions().getGCMode() == LangOptions::NonGC)
     return;
   
   if (isa<ObjCIvarRefExpr>(E)) {
index 0e8478b44571ef79b41e6032f3397e54b9f809d5..f79faaf238263a8ddf20861c123a2682250e0fb6 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: clang-cc -triple x86_64-apple-darwin10 -fobjc-gc -fobjc-newgc-api -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_ivar' %t  | count 14 &&
 // RUN: true
 
index 2d863817e8e9e20027de29058945883daf9f81a5..9b6b4151f6a0f768cbab2884cab6e9c54047355a 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: clang-cc -triple x86_64-apple-darwin10 -fnext-runtime -fobjc-gc -fobjc-newgc-api -emit-llvm -o %t %s &&
+// RUN: clang-cc -triple x86_64-apple-darwin10 -fnext-runtime -fobjc-gc -emit-llvm -o %t %s &&
 // RUN: grep -F '@objc_assign_global' %t  | count 26 &&
 // RUN: true
 
index eb74317d8fa5d2d99c008e50474efd18ecbd9f01..6a1aea6a73404fa8c0db2cb15c1443b816feb8da 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: clang-cc -triple x86_64-apple-darwin10 -fblocks -fnext-runtime -fobjc-gc -fobjc-newgc-api -emit-llvm -o %t %s &&
+// RUN: clang-cc -triple x86_64-apple-darwin10 -fblocks -fnext-runtime -fobjc-gc -emit-llvm -o %t %s &&
 // RUN: grep -F '@objc_assign_strongCast' %t  | count 4 &&
 // RUN: true
 
index 7c9334e58656e237427273235ee21bc406a3e6fa..c47224f1c516fedcafc60dc3fea9dd312832af49 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: clang-cc -triple x86_64-apple-darwin10 -fnext-runtime -fobjc-gc -fobjc-newgc-api -emit-llvm -o %t %s &&
+// RUN: clang-cc -triple x86_64-apple-darwin10 -fnext-runtime -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 &&
index 3e0971640c8bbc4b85b85c3dba57009e013e3f4d..53fa10a7a75f216c31511d57157e12ea6fed2bcb 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: clang-cc -triple x86_64-apple-darwin10 -fnext-runtime -fobjc-gc -fobjc-newgc-api -emit-llvm -o %t %s &&
+// RUN: clang-cc -triple x86_64-apple-darwin10 -fnext-runtime -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 &&
 // RUN: true
index 3e7c0262709977a9103d058767bde118afbf2566..8639eb56e0ae4969c600ed276bebf1852fc41623 100644 (file)
@@ -380,10 +380,6 @@ static llvm::cl::opt<bool>
 ObjCEnableGC("fobjc-gc",
              llvm::cl::desc("Enable Objective-C garbage collection"));
 
-static llvm::cl::opt<bool>
-ObjCEnableNewGCAPI("fobjc-newgc-api",
-             llvm::cl::desc("Enable Objective-C garbage collection's new API"));
-
 static llvm::cl::opt<bool>
 ObjCEnableGCBitmapPrint("print-ivar-layout",
              llvm::cl::desc("Enable Objective-C Ivar layout bitmap print trace"));
@@ -502,9 +498,6 @@ static void InitializeLangOptions(LangOptions &Options, LangKind LK){
   else if (ObjCEnableGC)
     Options.setGCMode(LangOptions::HybridGC);
 
-  if (ObjCEnableNewGCAPI)
-    Options.ObjCNewGCAPI = 1;
-
   if (ObjCEnableGCBitmapPrint)
     Options.ObjCGCBitmapPrint = 1;