[cfe-commits] r82493 - in /cfe/trunk: 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

Fariborz Jahanian fjahanian at apple.com
Mon Sep 21 16:03:37 PDT 2009


Author: fjahanian
Date: Mon Sep 21 18:03:37 2009
New Revision: 82493

URL: http://llvm.org/viewvc/llvm-project?rev=82493&view=rev
Log:
Removed -fobjc-newgc-api option. clang now conforms to
gcc-style write-barrier api only.


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

Modified: cfe/trunk/include/clang/Basic/LangOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/LangOptions.h?rev=82493&r1=82492&r2=82493&view=diff

==============================================================================
--- cfe/trunk/include/clang/Basic/LangOptions.h (original)
+++ cfe/trunk/include/clang/Basic/LangOptions.h Mon Sep 21 18:03:37 2009
@@ -88,7 +88,6 @@
 
   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 @@
 
     OverflowChecking = 0;
     ObjCGCBitmapPrint = 0;
-    ObjCNewGCAPI = 1;
 
     InstantiationDepth = 99;
 

Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExpr.cpp?rev=82493&r1=82492&r2=82493&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGExpr.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExpr.cpp Mon Sep 21 18:03:37 2009
@@ -691,8 +691,7 @@
 // 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)) {

Modified: cfe/trunk/test/CodeGenObjC/objc-assign-ivar.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/objc-assign-ivar.m?rev=82493&r1=82492&r2=82493&view=diff

==============================================================================
--- cfe/trunk/test/CodeGenObjC/objc-assign-ivar.m (original)
+++ cfe/trunk/test/CodeGenObjC/objc-assign-ivar.m Mon Sep 21 18:03:37 2009
@@ -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
 

Modified: cfe/trunk/test/CodeGenObjC/objc2-assign-global.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/objc2-assign-global.m?rev=82493&r1=82492&r2=82493&view=diff

==============================================================================
--- cfe/trunk/test/CodeGenObjC/objc2-assign-global.m (original)
+++ cfe/trunk/test/CodeGenObjC/objc2-assign-global.m Mon Sep 21 18:03:37 2009
@@ -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
 

Modified: cfe/trunk/test/CodeGenObjC/objc2-new-gc-api-strongcast.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/objc2-new-gc-api-strongcast.m?rev=82493&r1=82492&r2=82493&view=diff

==============================================================================
--- cfe/trunk/test/CodeGenObjC/objc2-new-gc-api-strongcast.m (original)
+++ cfe/trunk/test/CodeGenObjC/objc2-new-gc-api-strongcast.m Mon Sep 21 18:03:37 2009
@@ -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
 

Modified: cfe/trunk/test/CodeGenObjC/objc2-write-barrier-2.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/objc2-write-barrier-2.m?rev=82493&r1=82492&r2=82493&view=diff

==============================================================================
--- cfe/trunk/test/CodeGenObjC/objc2-write-barrier-2.m (original)
+++ cfe/trunk/test/CodeGenObjC/objc2-write-barrier-2.m Mon Sep 21 18:03:37 2009
@@ -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 &&

Modified: cfe/trunk/test/CodeGenObjC/objc2-write-barrier.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/objc2-write-barrier.m?rev=82493&r1=82492&r2=82493&view=diff

==============================================================================
--- cfe/trunk/test/CodeGenObjC/objc2-write-barrier.m (original)
+++ cfe/trunk/test/CodeGenObjC/objc2-write-barrier.m Mon Sep 21 18:03:37 2009
@@ -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

Modified: cfe/trunk/tools/clang-cc/clang-cc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-cc/clang-cc.cpp?rev=82493&r1=82492&r2=82493&view=diff

==============================================================================
--- cfe/trunk/tools/clang-cc/clang-cc.cpp (original)
+++ cfe/trunk/tools/clang-cc/clang-cc.cpp Mon Sep 21 18:03:37 2009
@@ -381,10 +381,6 @@
              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 @@
   else if (ObjCEnableGC)
     Options.setGCMode(LangOptions::HybridGC);
 
-  if (ObjCEnableNewGCAPI)
-    Options.ObjCNewGCAPI = 1;
-
   if (ObjCEnableGCBitmapPrint)
     Options.ObjCGCBitmapPrint = 1;
 





More information about the cfe-commits mailing list