diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-09-13 17:21:33 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-09-13 17:21:33 +0000 |
commit | e289d81369914678db386f6aa86faf8f178e245d (patch) | |
tree | 5fb05e9bbab057038b28cf6e4e87696f1c8cc8de /lib/CodeGen/CGObjC.cpp | |
parent | 8c7f4bca64d5128311ce50449ae9d2048c2ffea4 (diff) |
Switch LangOptions over to a .def file that describes header of the
language options. Use that .def file to declare the LangOptions class
and initialize all of its members, eliminating a source of annoying
initialization bugs.
AST serialization changes are next up.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139605 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjC.cpp')
-rw-r--r-- | lib/CodeGen/CGObjC.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp index ddf6e1f98a..1572b4b3cf 100644 --- a/lib/CodeGen/CGObjC.cpp +++ b/lib/CodeGen/CGObjC.cpp @@ -465,7 +465,7 @@ PropertyImplStrategy::PropertyImplStrategy(CodeGenModule &CGM, if (attrs & (ObjCPropertyDecl::OBJC_PR_retain | ObjCPropertyDecl::OBJC_PR_strong)) { // In GC-only, there's nothing special that needs to be done. - if (CGM.getLangOptions().getGCMode() == LangOptions::GCOnly) { + if (CGM.getLangOptions().getGC() == LangOptions::GCOnly) { // fallthrough // In ARC, if the property is non-atomic, use expression emission, @@ -506,14 +506,14 @@ PropertyImplStrategy::PropertyImplStrategy(CodeGenModule &CGM, // expressions. This actually works out to being atomic anyway, // except for ARC __strong, but that should trigger the above code. if (ivarType.hasNonTrivialObjCLifetime() || - (CGM.getLangOptions().getGCMode() && + (CGM.getLangOptions().getGC() && CGM.getContext().getObjCGCAttrKind(ivarType))) { Kind = Expression; return; } // Compute whether the ivar has strong members. - if (CGM.getLangOptions().getGCMode()) + if (CGM.getLangOptions().getGC()) if (const RecordType *recordType = ivarType->getAs<RecordType>()) HasStrong = recordType->getDecl()->hasObjectMember(); @@ -1066,7 +1066,7 @@ bool CodeGenFunction::IndirectObjCSetterArg(const CGFunctionInfo &FI) { } bool CodeGenFunction::IvarTypeWithAggrGCObjects(QualType Ty) { - if (CGM.getLangOptions().getGCMode() == LangOptions::NonGC) + if (CGM.getLangOptions().getGC() == LangOptions::NonGC) return false; if (const RecordType *FDTTy = Ty.getTypePtr()->getAs<RecordType>()) return FDTTy->getDecl()->hasObjectMember(); |