Skip to content

Commit 9c6890a

Browse files
committed
Simplify: replace getContext().getLangOpts() with just getLangOpts().
llvm-svn: 167261
1 parent 3494df4 commit 9c6890a

14 files changed

+48
-48
lines changed

clang/lib/CodeGen/CGCall.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1801,7 +1801,7 @@ void CodeGenFunction::EmitCallArg(CallArgList &args, const Expr *E,
18011801
QualType type) {
18021802
if (const ObjCIndirectCopyRestoreExpr *CRE
18031803
= dyn_cast<ObjCIndirectCopyRestoreExpr>(E)) {
1804-
assert(getContext().getLangOpts().ObjCAutoRefCount);
1804+
assert(getLangOpts().ObjCAutoRefCount);
18051805
assert(getContext().hasSameType(E->getType(), type));
18061806
return emitWritebackArg(*this, args, CRE);
18071807
}

clang/lib/CodeGen/CGClass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ void CodeGenFunction::EmitDestructorBody(FunctionArgList &Args) {
952952
}
953953
// -fapple-kext must inline any call to this dtor into
954954
// the caller's body.
955-
if (getContext().getLangOpts().AppleKext)
955+
if (getLangOpts().AppleKext)
956956
CurFn->addFnAttr(llvm::Attributes::AlwaysInline);
957957
break;
958958
}
@@ -1415,7 +1415,7 @@ void CodeGenFunction::EmitCXXDestructorCall(const CXXDestructorDecl *DD,
14151415
llvm::Value *VTT = GetVTTParameter(*this, GlobalDecl(DD, Type),
14161416
ForVirtualBase);
14171417
llvm::Value *Callee = 0;
1418-
if (getContext().getLangOpts().AppleKext)
1418+
if (getLangOpts().AppleKext)
14191419
Callee = BuildAppleKextVirtualDestructorCall(DD, Type,
14201420
DD->getParent());
14211421

clang/lib/CodeGen/CGDebugInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ llvm::DIType CGDebugInfo::CreateType(const BuiltinType *BT) {
351351
llvm_unreachable("Unexpected builtin type");
352352
case BuiltinType::NullPtr:
353353
return DBuilder.
354-
createNullPtrType(BT->getName(CGM.getContext().getLangOpts()));
354+
createNullPtrType(BT->getName(CGM.getLangOpts()));
355355
case BuiltinType::Void:
356356
return llvm::DIType();
357357
case BuiltinType::ObjCClass:
@@ -437,7 +437,7 @@ llvm::DIType CGDebugInfo::CreateType(const BuiltinType *BT) {
437437
case BuiltinType::ULong: BTName = "long unsigned int"; break;
438438
case BuiltinType::ULongLong: BTName = "long long unsigned int"; break;
439439
default:
440-
BTName = BT->getName(CGM.getContext().getLangOpts());
440+
BTName = BT->getName(CGM.getLangOpts());
441441
break;
442442
}
443443
// Bit size, align and offset of the type.

clang/lib/CodeGen/CGDecl.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ void CodeGenFunction::EmitVarDecl(const VarDecl &D) {
121121
// uniqued. We can't do this in C, though, because there's no
122122
// standard way to agree on which variables are the same (i.e.
123123
// there's no mangling).
124-
if (getContext().getLangOpts().CPlusPlus)
124+
if (getLangOpts().CPlusPlus)
125125
if (llvm::GlobalValue::isWeakForLinker(CurFn->getLinkage()))
126126
Linkage = CurFn->getLinkage();
127127

@@ -141,7 +141,7 @@ void CodeGenFunction::EmitVarDecl(const VarDecl &D) {
141141
static std::string GetStaticDeclName(CodeGenFunction &CGF, const VarDecl &D,
142142
const char *Separator) {
143143
CodeGenModule &CGM = CGF.CGM;
144-
if (CGF.getContext().getLangOpts().CPlusPlus) {
144+
if (CGF.getLangOpts().CPlusPlus) {
145145
StringRef Name = CGM.getMangledName(&D);
146146
return Name.str();
147147
}
@@ -222,7 +222,7 @@ CodeGenFunction::AddInitializerToStaticVarDecl(const VarDecl &D,
222222
// If constant emission failed, then this should be a C++ static
223223
// initializer.
224224
if (!Init) {
225-
if (!getContext().getLangOpts().CPlusPlus)
225+
if (!getLangOpts().CPlusPlus)
226226
CGM.ErrorUnsupported(D.getInit(), "constant l-value expression");
227227
else if (Builder.GetInsertBlock()) {
228228
// Since we have a static initializer, this global variable can't
@@ -795,7 +795,7 @@ CodeGenFunction::EmitAutoVarAlloca(const VarDecl &D) {
795795
llvm::Value *DeclPtr;
796796
if (Ty->isConstantSizeType()) {
797797
if (!Target.useGlobalsForAutomaticVariables()) {
798-
bool NRVO = getContext().getLangOpts().ElideConstructors &&
798+
bool NRVO = getLangOpts().ElideConstructors &&
799799
D.isNRVOVariable();
800800

801801
// If this value is a POD array or struct with a statically

clang/lib/CodeGen/CGDeclCXX.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ CreateGlobalInitOrDestructFunction(CodeGenModule &CGM,
221221
llvm::Function *Fn =
222222
llvm::Function::Create(FTy, llvm::GlobalValue::InternalLinkage,
223223
Name, &CGM.getModule());
224-
if (!CGM.getContext().getLangOpts().AppleKext) {
224+
if (!CGM.getLangOpts().AppleKext) {
225225
// Set the section if needed.
226226
if (const char *Section =
227227
CGM.getContext().getTargetInfo().getStaticInitSectionSpecifier())

clang/lib/CodeGen/CGExpr.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ EmitExprForReferenceBinding(CodeGenFunction &CGF, const Expr *E,
194194
// Objective-C++ ARC:
195195
// If we are binding a reference to a temporary that has ownership, we
196196
// need to perform retain/release operations on the temporary.
197-
if (M && CGF.getContext().getLangOpts().ObjCAutoRefCount &&
197+
if (M && CGF.getLangOpts().ObjCAutoRefCount &&
198198
M->getType()->isObjCLifetimeType() &&
199199
(M->getType().getObjCLifetime() == Qualifiers::OCL_Strong ||
200200
M->getType().getObjCLifetime() == Qualifiers::OCL_Weak ||
@@ -1771,8 +1771,8 @@ LValue CodeGenFunction::EmitUnaryOpLValue(const UnaryOperator *E) {
17711771
// of a pointer to object; as in void foo (__weak id *param); *param = 0;
17721772
// But, we continue to generate __strong write barrier on indirect write
17731773
// into a pointer to object.
1774-
if (getContext().getLangOpts().ObjC1 &&
1775-
getContext().getLangOpts().getGC() != LangOptions::NonGC &&
1774+
if (getLangOpts().ObjC1 &&
1775+
getLangOpts().getGC() != LangOptions::NonGC &&
17761776
LV.isObjCWeak())
17771777
LV.setNonGC(!E->isOBJCGCCandidate(getContext()));
17781778
return LV;
@@ -2177,14 +2177,14 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E) {
21772177
// Propagate the alignment from the array itself to the result.
21782178
ArrayAlignment = ArrayLV.getAlignment();
21792179

2180-
if (getContext().getLangOpts().isSignedOverflowDefined())
2180+
if (getLangOpts().isSignedOverflowDefined())
21812181
Address = Builder.CreateGEP(ArrayPtr, Args, "arrayidx");
21822182
else
21832183
Address = Builder.CreateInBoundsGEP(ArrayPtr, Args, "arrayidx");
21842184
} else {
21852185
// The base must be a pointer, which is not an aggregate. Emit it.
21862186
llvm::Value *Base = EmitScalarExpr(E->getBase());
2187-
if (getContext().getLangOpts().isSignedOverflowDefined())
2187+
if (getLangOpts().isSignedOverflowDefined())
21882188
Address = Builder.CreateGEP(Base, Idx, "arrayidx");
21892189
else
21902190
Address = Builder.CreateInBoundsGEP(Base, Idx, "arrayidx");
@@ -2207,8 +2207,8 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E) {
22072207

22082208
LV.getQuals().setAddressSpace(E->getBase()->getType().getAddressSpace());
22092209

2210-
if (getContext().getLangOpts().ObjC1 &&
2211-
getContext().getLangOpts().getGC() != LangOptions::NonGC) {
2210+
if (getLangOpts().ObjC1 &&
2211+
getLangOpts().getGC() != LangOptions::NonGC) {
22122212
LV.setNonGC(!E->isOBJCGCCandidate(getContext()));
22132213
setObjCGCLValueClass(getContext(), E, LV);
22142214
}
@@ -2721,7 +2721,7 @@ RValue CodeGenFunction::EmitCallExpr(const CallExpr *E,
27212721
if (const CXXPseudoDestructorExpr *PseudoDtor
27222722
= dyn_cast<CXXPseudoDestructorExpr>(E->getCallee()->IgnoreParens())) {
27232723
QualType DestroyedType = PseudoDtor->getDestroyedType();
2724-
if (getContext().getLangOpts().ObjCAutoRefCount &&
2724+
if (getLangOpts().ObjCAutoRefCount &&
27252725
DestroyedType->isObjCLifetimeType() &&
27262726
(DestroyedType.getObjCLifetime() == Qualifiers::OCL_Strong ||
27272727
DestroyedType.getObjCLifetime() == Qualifiers::OCL_Weak)) {

clang/lib/CodeGen/CGExprAgg.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ static void CheckAggExprForMemSetUse(AggValueSlot &Slot, const Expr *E,
12081208
if (Slot.isZeroed() || Slot.isVolatile() || Slot.getAddr() == 0) return;
12091209

12101210
// C++ objects with a user-declared constructor don't need zero'ing.
1211-
if (CGF.getContext().getLangOpts().CPlusPlus)
1211+
if (CGF.getLangOpts().CPlusPlus)
12121212
if (const RecordType *RT = CGF.getContext()
12131213
.getBaseElementType(E->getType())->getAs<RecordType>()) {
12141214
const CXXRecordDecl *RD = cast<CXXRecordDecl>(RT->getDecl());
@@ -1278,7 +1278,7 @@ void CodeGenFunction::EmitAggregateCopy(llvm::Value *DestPtr,
12781278
bool isAssignment) {
12791279
assert(!Ty->isAnyComplexType() && "Shouldn't happen for complex");
12801280

1281-
if (getContext().getLangOpts().CPlusPlus) {
1281+
if (getLangOpts().CPlusPlus) {
12821282
if (const RecordType *RT = Ty->getAs<RecordType>()) {
12831283
CXXRecordDecl *Record = cast<CXXRecordDecl>(RT->getDecl());
12841284
assert((Record->hasTrivialCopyConstructor() ||

clang/lib/CodeGen/CGExprCXX.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ RValue CodeGenFunction::EmitCXXMemberCallExpr(const CXXMemberCallExpr *CE,
286286
if (UseVirtualCall) {
287287
Callee = BuildVirtualCall(Dtor, Dtor_Complete, This, Ty);
288288
} else {
289-
if (getContext().getLangOpts().AppleKext &&
289+
if (getLangOpts().AppleKext &&
290290
MD->isVirtual() &&
291291
ME->hasQualifier())
292292
Callee = BuildAppleKextVirtualCall(MD, ME->getQualifier(), Ty);
@@ -304,7 +304,7 @@ RValue CodeGenFunction::EmitCXXMemberCallExpr(const CXXMemberCallExpr *CE,
304304
} else if (UseVirtualCall) {
305305
Callee = BuildVirtualCall(MD, This, Ty);
306306
} else {
307-
if (getContext().getLangOpts().AppleKext &&
307+
if (getLangOpts().AppleKext &&
308308
MD->isVirtual() &&
309309
ME->hasQualifier())
310310
Callee = BuildAppleKextVirtualCall(MD, ME->getQualifier(), Ty);
@@ -469,7 +469,7 @@ CodeGenFunction::EmitCXXConstructExpr(const CXXConstructExpr *E,
469469
// Elide the constructor if we're constructing from a temporary.
470470
// The temporary check is required because Sema sets this on NRVO
471471
// returns.
472-
if (getContext().getLangOpts().ElideConstructors && E->isElidable()) {
472+
if (getLangOpts().ElideConstructors && E->isElidable()) {
473473
assert(getContext().hasSameUnqualifiedType(E->getType(),
474474
E->getArg(0)->getType()));
475475
if (E->getArg(0)->isTemporaryObject(getContext(), CD->getParent())) {

clang/lib/CodeGen/CGExprComplex.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ EmitCompoundAssign(const CompoundAssignOperator *E,
641641
LValue LV = EmitCompoundAssignLValue(E, Func, Val);
642642

643643
// The result of an assignment in C is the assigned r-value.
644-
if (!CGF.getContext().getLangOpts().CPlusPlus)
644+
if (!CGF.getLangOpts().CPlusPlus)
645645
return Val;
646646

647647
// If the lvalue is non-volatile, return the computed value of the assignment.
@@ -676,7 +676,7 @@ ComplexPairTy ComplexExprEmitter::VisitBinAssign(const BinaryOperator *E) {
676676
LValue LV = EmitBinAssignLValue(E, Val);
677677

678678
// The result of an assignment in C is the assigned r-value.
679-
if (!CGF.getContext().getLangOpts().CPlusPlus)
679+
if (!CGF.getLangOpts().CPlusPlus)
680680
return Val;
681681

682682
// If the lvalue is non-volatile, return the computed value of the assignment.

clang/lib/CodeGen/CGExprScalar.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ class ScalarExprEmitter
402402
// Binary Operators.
403403
Value *EmitMul(const BinOpInfo &Ops) {
404404
if (Ops.Ty->isSignedIntegerOrEnumerationType()) {
405-
switch (CGF.getContext().getLangOpts().getSignedOverflowBehavior()) {
405+
switch (CGF.getLangOpts().getSignedOverflowBehavior()) {
406406
case LangOptions::SOB_Defined:
407407
return Builder.CreateMul(Ops.LHS, Ops.RHS, "mul");
408408
case LangOptions::SOB_Undefined:
@@ -1413,7 +1413,7 @@ llvm::Value *ScalarExprEmitter::
14131413
EmitAddConsiderOverflowBehavior(const UnaryOperator *E,
14141414
llvm::Value *InVal,
14151415
llvm::Value *NextVal, bool IsInc) {
1416-
switch (CGF.getContext().getLangOpts().getSignedOverflowBehavior()) {
1416+
switch (CGF.getLangOpts().getSignedOverflowBehavior()) {
14171417
case LangOptions::SOB_Defined:
14181418
return Builder.CreateAdd(InVal, NextVal, IsInc ? "inc" : "dec");
14191419
case LangOptions::SOB_Undefined:
@@ -1488,7 +1488,7 @@ ScalarExprEmitter::EmitScalarPrePostIncDec(const UnaryOperator *E, LValue LV,
14881488
= CGF.getContext().getAsVariableArrayType(type)) {
14891489
llvm::Value *numElts = CGF.getVLASize(vla).first;
14901490
if (!isInc) numElts = Builder.CreateNSWNeg(numElts, "vla.negsize");
1491-
if (CGF.getContext().getLangOpts().isSignedOverflowDefined())
1491+
if (CGF.getLangOpts().isSignedOverflowDefined())
14921492
value = Builder.CreateGEP(value, numElts, "vla.inc");
14931493
else
14941494
value = Builder.CreateInBoundsGEP(value, numElts, "vla.inc");
@@ -1498,7 +1498,7 @@ ScalarExprEmitter::EmitScalarPrePostIncDec(const UnaryOperator *E, LValue LV,
14981498
llvm::Value *amt = Builder.getInt32(amount);
14991499

15001500
value = CGF.EmitCastToVoidPtr(value);
1501-
if (CGF.getContext().getLangOpts().isSignedOverflowDefined())
1501+
if (CGF.getLangOpts().isSignedOverflowDefined())
15021502
value = Builder.CreateGEP(value, amt, "incdec.funcptr");
15031503
else
15041504
value = Builder.CreateInBoundsGEP(value, amt, "incdec.funcptr");
@@ -1507,7 +1507,7 @@ ScalarExprEmitter::EmitScalarPrePostIncDec(const UnaryOperator *E, LValue LV,
15071507
// For everything else, we can just do a simple increment.
15081508
} else {
15091509
llvm::Value *amt = Builder.getInt32(amount);
1510-
if (CGF.getContext().getLangOpts().isSignedOverflowDefined())
1510+
if (CGF.getLangOpts().isSignedOverflowDefined())
15111511
value = Builder.CreateGEP(value, amt, "incdec.ptr");
15121512
else
15131513
value = Builder.CreateInBoundsGEP(value, amt, "incdec.ptr");
@@ -1568,7 +1568,7 @@ ScalarExprEmitter::EmitScalarPrePostIncDec(const UnaryOperator *E, LValue LV,
15681568
llvm::Value *sizeValue =
15691569
llvm::ConstantInt::get(CGF.SizeTy, size.getQuantity());
15701570

1571-
if (CGF.getContext().getLangOpts().isSignedOverflowDefined())
1571+
if (CGF.getLangOpts().isSignedOverflowDefined())
15721572
value = Builder.CreateGEP(value, sizeValue, "incdec.objptr");
15731573
else
15741574
value = Builder.CreateInBoundsGEP(value, sizeValue, "incdec.objptr");
@@ -1911,7 +1911,7 @@ Value *ScalarExprEmitter::EmitCompoundAssign(const CompoundAssignOperator *E,
19111911
return 0;
19121912

19131913
// The result of an assignment in C is the assigned r-value.
1914-
if (!CGF.getContext().getLangOpts().CPlusPlus)
1914+
if (!CGF.getLangOpts().CPlusPlus)
19151915
return RHS;
19161916

19171917
// If the lvalue is non-volatile, return the computed value of the assignment.
@@ -1952,7 +1952,7 @@ Value *ScalarExprEmitter::EmitDiv(const BinOpInfo &Ops) {
19521952
}
19531953
if (Ops.LHS->getType()->isFPOrFPVectorTy()) {
19541954
llvm::Value *Val = Builder.CreateFDiv(Ops.LHS, Ops.RHS, "div");
1955-
if (CGF.getContext().getLangOpts().OpenCL) {
1955+
if (CGF.getLangOpts().OpenCL) {
19561956
// OpenCL 1.1 7.4: minimum accuracy of single precision / is 2.5ulp
19571957
llvm::Type *ValTy = Val->getType();
19581958
if (ValTy->isFloatTy() ||
@@ -2019,7 +2019,7 @@ Value *ScalarExprEmitter::EmitOverflowCheckedBinOp(const BinOpInfo &Ops) {
20192019

20202020
// Handle overflow with llvm.trap if no custom handler has been specified.
20212021
const std::string *handlerName =
2022-
&CGF.getContext().getLangOpts().OverflowHandler;
2022+
&CGF.getLangOpts().OverflowHandler;
20232023
if (handlerName->empty()) {
20242024
// If -fcatch-undefined-behavior is enabled, emit a call to its
20252025
// runtime. Otherwise, this is a -ftrapv check, so just emit a trap.
@@ -2209,7 +2209,7 @@ static Value* tryEmitFMulAdd(const BinOpInfo &op,
22092209

22102210
// Check whether -ffp-contract=on. (If -ffp-contract=off/fast, fusing is
22112211
// either disabled, or handled entirely by the LLVM backend).
2212-
if (CGF.getContext().getLangOpts().getFPContractMode() != LangOptions::FPC_On)
2212+
if (CGF.getLangOpts().getFPContractMode() != LangOptions::FPC_On)
22132213
return 0;
22142214

22152215
// We have a potentially fusable op. Look for a mul on one of the operands.
@@ -2237,7 +2237,7 @@ Value *ScalarExprEmitter::EmitAdd(const BinOpInfo &op) {
22372237
return emitPointerArithmetic(CGF, op, /*subtraction*/ false);
22382238

22392239
if (op.Ty->isSignedIntegerOrEnumerationType()) {
2240-
switch (CGF.getContext().getLangOpts().getSignedOverflowBehavior()) {
2240+
switch (CGF.getLangOpts().getSignedOverflowBehavior()) {
22412241
case LangOptions::SOB_Defined:
22422242
return Builder.CreateAdd(op.LHS, op.RHS, "add");
22432243
case LangOptions::SOB_Undefined:
@@ -2264,7 +2264,7 @@ Value *ScalarExprEmitter::EmitSub(const BinOpInfo &op) {
22642264
// The LHS is always a pointer if either side is.
22652265
if (!op.LHS->getType()->isPointerTy()) {
22662266
if (op.Ty->isSignedIntegerOrEnumerationType()) {
2267-
switch (CGF.getContext().getLangOpts().getSignedOverflowBehavior()) {
2267+
switch (CGF.getLangOpts().getSignedOverflowBehavior()) {
22682268
case LangOptions::SOB_Defined:
22692269
return Builder.CreateSub(op.LHS, op.RHS, "sub");
22702270
case LangOptions::SOB_Undefined:
@@ -2611,7 +2611,7 @@ Value *ScalarExprEmitter::VisitBinAssign(const BinaryOperator *E) {
26112611
return 0;
26122612

26132613
// The result of an assignment in C is the assigned r-value.
2614-
if (!CGF.getContext().getLangOpts().CPlusPlus)
2614+
if (!CGF.getLangOpts().CPlusPlus)
26152615
return RHS;
26162616

26172617
// If the lvalue is non-volatile, return the computed value of the assignment.
@@ -2825,7 +2825,7 @@ VisitAbstractConditionalOperator(const AbstractConditionalOperator *E) {
28252825

28262826
// OpenCL: If the condition is a vector, we can treat this condition like
28272827
// the select function.
2828-
if (CGF.getContext().getLangOpts().OpenCL
2828+
if (CGF.getLangOpts().OpenCL
28292829
&& condExpr->getType()->isVectorType()) {
28302830
llvm::Value *CondV = CGF.EmitScalarExpr(condExpr);
28312831
llvm::Value *LHS = Visit(lhsExpr);

clang/lib/CodeGen/CGObjCGNU.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2070,7 +2070,7 @@ void CGObjCGNU::GenerateClass(const ObjCImplementationDecl *OID) {
20702070
Context.getASTObjCInterfaceLayout(SuperClassDecl).getSize().getQuantity();
20712071
// For non-fragile ivars, set the instance size to 0 - {the size of just this
20722072
// class}. The runtime will then set this to the correct value on load.
2073-
if (CGM.getContext().getLangOpts().ObjCRuntime.isNonFragile()) {
2073+
if (CGM.getLangOpts().ObjCRuntime.isNonFragile()) {
20742074
instanceSize = 0 - (instanceSize - superInstanceSize);
20752075
}
20762076

@@ -2085,7 +2085,7 @@ void CGObjCGNU::GenerateClass(const ObjCImplementationDecl *OID) {
20852085
// Get the offset
20862086
uint64_t BaseOffset = ComputeIvarBaseOffset(CGM, OID, IVD);
20872087
uint64_t Offset = BaseOffset;
2088-
if (CGM.getContext().getLangOpts().ObjCRuntime.isNonFragile()) {
2088+
if (CGM.getLangOpts().ObjCRuntime.isNonFragile()) {
20892089
Offset = BaseOffset - superInstanceSize;
20902090
}
20912091
llvm::Constant *OffsetValue = llvm::ConstantInt::get(IntTy, Offset);

clang/lib/CodeGen/CGRTTI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@ llvm::Constant *CodeGenModule::GetAddrOfRTTIDescriptor(QualType Ty,
977977
// Return a bogus pointer if RTTI is disabled, unless it's for EH.
978978
// FIXME: should we even be calling this method if RTTI is disabled
979979
// and it's not for EH?
980-
if (!ForEH && !getContext().getLangOpts().RTTI)
980+
if (!ForEH && !getLangOpts().RTTI)
981981
return llvm::Constant::getNullValue(Int8PtrTy);
982982

983983
if (ForEH && Ty->isObjCObjectPointerType() &&

0 commit comments

Comments
 (0)