summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-02-18 17:52:36 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-02-18 17:52:36 +0000
commit257eac6d0c149c11e5c2ef086d16d3ddb86c1674 (patch)
tree99a06e0dc84319cb1993efc9885da230697d1b83 /clang/lib/CodeGen
parenta26fb347a05436bfef008bb62eb820ada9fdbc68 (diff)
downloadbcm5719-llvm-257eac6d0c149c11e5c2ef086d16d3ddb86c1674.tar.gz
bcm5719-llvm-257eac6d0c149c11e5c2ef086d16d3ddb86c1674.zip
Cleanup objc's gc attributes code no longer needed.
This make warn-weak-field.m to fail (subject of a followup patch). attr-objc-gc.m no passes. llvm-svn: 64925
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGExpr.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index eed9ed7729b..4e60cc518b3 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/lib/CodeGen/CGExpr.cpp
@@ -609,12 +609,16 @@ void CodeGenFunction::EmitStoreThroughExtVectorComponentLValue(RValue Src,
static void SetVarDeclObjCAttribute(ASTContext &Ctx, const Decl *VD,
const QualType &Ty, LValue &LV)
{
+#if 0
+// FIXME. ObjCGCAttr no more.
if (const ObjCGCAttr *A = VD->getAttr<ObjCGCAttr>()) {
ObjCGCAttr::GCAttrTypes attrType = A->getType();
LValue::SetObjCType(attrType == ObjCGCAttr::Weak,
attrType == ObjCGCAttr::Strong, LV);
}
- else if (Ctx.getLangOptions().ObjC1 &&
+ else
+#endif
+ if (Ctx.getLangOptions().ObjC1 &&
Ctx.getLangOptions().getGCMode() != LangOptions::NonGC) {
// Default behavious under objective-c's gc is for objective-c pointers
// be treated as though they were declared as __strong.
@@ -925,12 +929,16 @@ LValue CodeGenFunction::EmitLValueForField(llvm::Value* BaseValue,
LValue LV =
LValue::MakeAddr(V,
Field->getType().getCVRQualifiers()|CVRQualifiers);
+#if 0
+// FIXME. ObjCGCAttr is no more.
if (const ObjCGCAttr *A = Field->getAttr<ObjCGCAttr>()) {
ObjCGCAttr::GCAttrTypes attrType = A->getType();
// __weak attribute on a field is ignored.
LValue::SetObjCType(false, attrType == ObjCGCAttr::Strong, LV);
}
- else if (CGM.getLangOptions().ObjC1 &&
+ else
+#endif
+ if (CGM.getLangOptions().ObjC1 &&
CGM.getLangOptions().getGCMode() != LangOptions::NonGC) {
QualType ExprTy = Field->getType();
if (getContext().isObjCObjectPointerType(ExprTy))
OpenPOWER on IntegriCloud