From ba372b85524f712e5b97a176f6ce0197d365835d Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Wed, 18 Feb 2009 17:52:36 +0000 Subject: 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64925 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExpr.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'lib/CodeGen/CGExpr.cpp') diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index eed9ed7729..4e60cc518b 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/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::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::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)) -- cgit v1.2.3