diff options
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/CGBlocks.cpp | 2 | ||||
-rw-r--r-- | lib/CodeGen/CGDecl.cpp | 2 | ||||
-rw-r--r-- | lib/CodeGen/CGExpr.cpp | 6 | ||||
-rw-r--r-- | lib/CodeGen/CGExprAgg.cpp | 4 | ||||
-rw-r--r-- | lib/CodeGen/CGObjC.cpp | 8 | ||||
-rw-r--r-- | lib/CodeGen/CGObjCGNU.cpp | 10 | ||||
-rw-r--r-- | lib/CodeGen/CGObjCMac.cpp | 12 | ||||
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 4 |
8 files changed, 24 insertions, 24 deletions
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp index fd93255e5c..1e9fae0aae 100644 --- a/lib/CodeGen/CGBlocks.cpp +++ b/lib/CodeGen/CGBlocks.cpp @@ -1804,7 +1804,7 @@ namespace { /// to be done externally. void CodeGenFunction::enterByrefCleanup(const AutoVarEmission &emission) { // We don't enter this cleanup if we're in pure-GC mode. - if (CGM.getLangOptions().getGCMode() == LangOptions::GCOnly) + if (CGM.getLangOptions().getGC() == LangOptions::GCOnly) return; EHStack.pushCleanup<CallBlockRelease>(NormalAndEHCleanup, emission.Address); diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp index 9ecc72781c..78a1101ce1 100644 --- a/lib/CodeGen/CGDecl.cpp +++ b/lib/CodeGen/CGDecl.cpp @@ -1120,7 +1120,7 @@ void CodeGenFunction::EmitAutoVarCleanups(const AutoVarEmission &emission) { emitAutoVarTypeCleanup(emission, dtorKind); // In GC mode, honor objc_precise_lifetime. - if (getLangOptions().getGCMode() != LangOptions::NonGC && + if (getLangOptions().getGC() != LangOptions::NonGC && D.hasAttr<ObjCPreciseLifetimeAttr>()) { EHStack.pushCleanup<ExtendGCLifetime>(NormalCleanup, &D); } diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index d6ceef5e38..f4c552b085 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -1212,7 +1212,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) + if (Ctx.getLangOptions().getGC() == LangOptions::NonGC) return; if (isa<ObjCIvarRefExpr>(E)) { @@ -1419,7 +1419,7 @@ LValue CodeGenFunction::EmitUnaryOpLValue(const UnaryOperator *E) { // But, we continue to generate __strong write barrier on indirect write // into a pointer to object. if (getContext().getLangOptions().ObjC1 && - getContext().getLangOptions().getGCMode() != LangOptions::NonGC && + getContext().getLangOptions().getGC() != LangOptions::NonGC && LV.isObjCWeak()) LV.setNonGC(!E->isOBJCGCCandidate(getContext())); return LV; @@ -1680,7 +1680,7 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E) { LV.getQuals().setAddressSpace(E->getBase()->getType().getAddressSpace()); if (getContext().getLangOptions().ObjC1 && - getContext().getLangOptions().getGCMode() != LangOptions::NonGC) { + getContext().getLangOptions().getGC() != LangOptions::NonGC) { LV.setNonGC(!E->isOBJCGCCandidate(getContext())); setObjCGCLValueClass(getContext(), E, LV); } diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp index f965cf7e3f..856378b34f 100644 --- a/lib/CodeGen/CGExprAgg.cpp +++ b/lib/CodeGen/CGExprAgg.cpp @@ -79,7 +79,7 @@ public: void EmitMoveFromReturnSlot(const Expr *E, RValue Src); AggValueSlot::NeedsGCBarriers_t needsGC(QualType T) { - if (CGF.getLangOptions().getGCMode() && TypeRequiresGCollection(T)) + if (CGF.getLangOptions().getGC() && TypeRequiresGCollection(T)) return AggValueSlot::NeedsGCBarriers; return AggValueSlot::DoesNotNeedGCBarriers; } @@ -1123,7 +1123,7 @@ void CodeGenFunction::EmitAggregateCopy(llvm::Value *DestPtr, SrcPtr = Builder.CreateBitCast(SrcPtr, SBP, "tmp"); // Don't do any of the memmove_collectable tests if GC isn't set. - if (CGM.getLangOptions().getGCMode() == LangOptions::NonGC) { + if (CGM.getLangOptions().getGC() == LangOptions::NonGC) { // fall through } else if (const RecordType *RecordTy = Ty->getAs<RecordType>()) { RecordDecl *Record = RecordTy->getDecl(); 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(); diff --git a/lib/CodeGen/CGObjCGNU.cpp b/lib/CodeGen/CGObjCGNU.cpp index 857351b8fe..ae05c3947b 100644 --- a/lib/CodeGen/CGObjCGNU.cpp +++ b/lib/CodeGen/CGObjCGNU.cpp @@ -743,11 +743,11 @@ CGObjCGNU::CGObjCGNU(CodeGenModule &cgm, unsigned runtimeABIVersion, true)); const LangOptions &Opts = CGM.getLangOptions(); - if ((Opts.getGCMode() != LangOptions::NonGC) || Opts.ObjCAutoRefCount) + if ((Opts.getGC() != LangOptions::NonGC) || Opts.ObjCAutoRefCount) RuntimeVersion = 10; // Don't bother initialising the GC stuff unless we're compiling in GC mode - if (Opts.getGCMode() != LangOptions::NonGC) { + if (Opts.getGC() != LangOptions::NonGC) { // This is a bit of an hack. We should sort this out by having a proper // CGObjCGNUstep subclass for GC, but we may want to really support the old // ABI and GC added in ObjectiveC2.framework, so we fudge it a bit for now @@ -970,7 +970,7 @@ CGObjCGNU::GenerateMessageSendSuper(CodeGenFunction &CGF, const CallArgList &CallArgs, const ObjCMethodDecl *Method) { CGBuilderTy &Builder = CGF.Builder; - if (CGM.getLangOptions().getGCMode() == LangOptions::GCOnly) { + if (CGM.getLangOptions().getGC() == LangOptions::GCOnly) { if (Sel == RetainSel || Sel == AutoreleaseSel) { return RValue::get(EnforceType(Builder, Receiver, CGM.getTypes().ConvertType(ResultType))); @@ -1078,7 +1078,7 @@ CGObjCGNU::GenerateMessageSend(CodeGenFunction &CGF, CGBuilderTy &Builder = CGF.Builder; // Strip out message sends to retain / release in GC mode - if (CGM.getLangOptions().getGCMode() == LangOptions::GCOnly) { + if (CGM.getLangOptions().getGC() == LangOptions::GCOnly) { if (Sel == RetainSel || Sel == AutoreleaseSel) { return RValue::get(EnforceType(Builder, Receiver, CGM.getTypes().ConvertType(ResultType))); @@ -2169,7 +2169,7 @@ llvm::Function *CGObjCGNU::ModuleInitFunction() { Elements.push_back(SymTab); if (RuntimeVersion >= 10) - switch (CGM.getLangOptions().getGCMode()) { + switch (CGM.getLangOptions().getGC()) { case LangOptions::GCOnly: Elements.push_back(llvm::ConstantInt::get(IntTy, 2)); break; 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")); diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 67757a22c5..7a946cb9d5 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -473,9 +473,9 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, if (isa<CXXConstructorDecl>(D) || isa<CXXDestructorDecl>(D)) F->setUnnamedAddr(true); - if (Features.getStackProtectorMode() == LangOptions::SSPOn) + if (Features.getStackProtector() == LangOptions::SSPOn) F->addFnAttr(llvm::Attribute::StackProtect); - else if (Features.getStackProtectorMode() == LangOptions::SSPReq) + else if (Features.getStackProtector() == LangOptions::SSPReq) F->addFnAttr(llvm::Attribute::StackProtectReq); unsigned alignment = D->getMaxAlignment() / Context.getCharWidth(); |