aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-09-21 23:03:37 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-09-21 23:03:37 +0000
commitb924259cc53e4d38e493616715e7b3e95bdee1ef (patch)
treee759646ba36c339ff97d591c586eb00ea8567630
parent69181a863c9a87ea84e96157191f855043b86cfb (diff)
Removed -fobjc-newgc-api option. clang now conforms to
gcc-style write-barrier api only. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82493 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Basic/LangOptions.h2
-rw-r--r--lib/CodeGen/CGExpr.cpp3
-rw-r--r--test/CodeGenObjC/objc-assign-ivar.m2
-rw-r--r--test/CodeGenObjC/objc2-assign-global.m2
-rw-r--r--test/CodeGenObjC/objc2-new-gc-api-strongcast.m2
-rw-r--r--test/CodeGenObjC/objc2-write-barrier-2.m2
-rw-r--r--test/CodeGenObjC/objc2-write-barrier.m2
-rw-r--r--tools/clang-cc/clang-cc.cpp7
8 files changed, 6 insertions, 16 deletions
diff --git a/include/clang/Basic/LangOptions.h b/include/clang/Basic/LangOptions.h
index 1dab615429..d4d3fe50eb 100644
--- a/include/clang/Basic/LangOptions.h
+++ b/include/clang/Basic/LangOptions.h
@@ -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;
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
index 157369d754..2539387e96 100644
--- a/lib/CodeGen/CGExpr.cpp
+++ b/lib/CodeGen/CGExpr.cpp
@@ -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)) {
diff --git a/test/CodeGenObjC/objc-assign-ivar.m b/test/CodeGenObjC/objc-assign-ivar.m
index 0e8478b445..f79faaf238 100644
--- a/test/CodeGenObjC/objc-assign-ivar.m
+++ b/test/CodeGenObjC/objc-assign-ivar.m
@@ -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
diff --git a/test/CodeGenObjC/objc2-assign-global.m b/test/CodeGenObjC/objc2-assign-global.m
index 2d863817e8..9b6b4151f6 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 -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
diff --git a/test/CodeGenObjC/objc2-new-gc-api-strongcast.m b/test/CodeGenObjC/objc2-new-gc-api-strongcast.m
index eb74317d8f..6a1aea6a73 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 -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
diff --git a/test/CodeGenObjC/objc2-write-barrier-2.m b/test/CodeGenObjC/objc2-write-barrier-2.m
index 7c9334e586..c47224f1c5 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 -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 &&
diff --git a/test/CodeGenObjC/objc2-write-barrier.m b/test/CodeGenObjC/objc2-write-barrier.m
index 3e0971640c..53fa10a7a7 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 -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
diff --git a/tools/clang-cc/clang-cc.cpp b/tools/clang-cc/clang-cc.cpp
index 3e7c026270..8639eb56e0 100644
--- a/tools/clang-cc/clang-cc.cpp
+++ b/tools/clang-cc/clang-cc.cpp
@@ -381,10 +381,6 @@ 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;