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/CGObjCMac.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/CGObjCMac.cpp')
-rw-r--r-- | lib/CodeGen/CGObjCMac.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp index fa49f1e09f..665b7f97c2 100644 --- a/lib/CodeGen/CGObjCMac.cpp +++ b/lib/CodeGen/CGObjCMac.cpp @@ -1605,7 +1605,7 @@ llvm::Constant *CGObjCCommonMac::BuildGCBlockLayout(CodeGenModule &CGM, llvm::Constant *nullPtr = llvm::Constant::getNullValue(llvm::Type::getInt8PtrTy(VMContext)); - if (CGM.getLangOptions().getGCMode() == LangOptions::NonGC && + if (CGM.getLangOptions().getGC() == LangOptions::NonGC && !CGM.getLangOptions().ObjCAutoRefCount) return nullPtr; @@ -3384,9 +3384,9 @@ void CGObjCCommonMac::EmitImageInfo() { unsigned flags = 0; // FIXME: Fix and continue? - if (CGM.getLangOptions().getGCMode() != LangOptions::NonGC) + if (CGM.getLangOptions().getGC() != LangOptions::NonGC) flags |= eImageInfo_GarbageCollected; - if (CGM.getLangOptions().getGCMode() == LangOptions::GCOnly) + if (CGM.getLangOptions().getGC() == LangOptions::GCOnly) flags |= eImageInfo_GCOnly; // We never allow @synthesize of a superclass property. @@ -3890,7 +3890,7 @@ llvm::Constant *CGObjCCommonMac::BuildIvarLayout( bool hasUnion = false; llvm::Type *PtrTy = llvm::Type::getInt8PtrTy(VMContext); - if (CGM.getLangOptions().getGCMode() == LangOptions::NonGC && + if (CGM.getLangOptions().getGC() == LangOptions::NonGC && !CGM.getLangOptions().ObjCAutoRefCount) return llvm::Constant::getNullValue(PtrTy); @@ -4656,7 +4656,7 @@ bool CGObjCNonFragileABIMac::isVTableDispatchedSelector(Selector Sel) { // These are vtable-based if GC is disabled. // Optimistically use vtable dispatch for hybrid compiles. - if (CGM.getLangOptions().getGCMode() != LangOptions::GCOnly) { + if (CGM.getLangOptions().getGC() != LangOptions::GCOnly) { VTableDispatchMethods.insert(GetNullarySelector("retain")); VTableDispatchMethods.insert(GetNullarySelector("release")); VTableDispatchMethods.insert(GetNullarySelector("autorelease")); @@ -4672,7 +4672,7 @@ bool CGObjCNonFragileABIMac::isVTableDispatchedSelector(Selector Sel) { // These are vtable-based if GC is enabled. // Optimistically use vtable dispatch for hybrid compiles. - if (CGM.getLangOptions().getGCMode() != LangOptions::NonGC) { + if (CGM.getLangOptions().getGC() != LangOptions::NonGC) { VTableDispatchMethods.insert(GetNullarySelector("hash")); VTableDispatchMethods.insert(GetUnarySelector("addObject")); |