Skip to content

Commit d3412d4

Browse files
committed
[IR] Adopt removal of PointerType::get pointee type overloads. NFC.
The overload was deprecated in 146ad71. Switch our downstream uses to the Context overload.
1 parent e797794 commit d3412d4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

clang/lib/CodeGen/CGExpr.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1761,7 +1761,8 @@ static Address EmitPointerWithAlignment(const Expr *E, LValueBaseInfo *BaseInfo,
17611761
unsigned AS = DestPointeeType->isFunctionTy()
17621762
? CGF.CGM.getDataLayout().getProgramAddressSpace()
17631763
: CGF.getTypes().getTargetAddressSpace(ETy);
1764-
llvm::Type *DestTy = llvm::PointerType::get(DestPointeeType, AS);
1764+
llvm::Type *DestTy =
1765+
llvm::PointerType::get(CGF.getLLVMContext(), AS);
17651766

17661767
auto RemoveBoundsSafetyAttrs = [&] (const QualType& QT) {
17671768
if (auto PtrTy = QT->getAs<PointerType>()) {

llvm/lib/Transforms/Scalar/ConstraintElimination.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,7 @@ void State::addPointerBoundInfo(Value *PtrOp, Value *IdxOp, DomTreeNode *DTN,
11341134
// against.
11351135
I.first->second =
11361136
new LoadInst(IdxOp->getType(),
1137-
UndefValue::get(PointerType::get(IdxOp->getType(), 0)),
1137+
UndefValue::get(PointerType::get(IdxOp->getContext(), 0)),
11381138
"ub", false, Align(1));
11391139
ExtraCmps.push_back(cast<Instruction>(I.first->second));
11401140
}

0 commit comments

Comments
 (0)