Skip to content

Commit 68ee36a

Browse files
authored
[CIR] Remove inferred context from pointer type getters (#138858)
This mirror incubator changes from llvm/clangir#1600
1 parent 84b1b62 commit 68ee36a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class CIRBaseBuilderTy : public mlir::OpBuilder {
111111
cir::BoolType getBoolTy() { return cir::BoolType::get(getContext()); }
112112

113113
cir::PointerType getPointerTo(mlir::Type ty) {
114-
return cir::PointerType::get(getContext(), ty);
114+
return cir::PointerType::get(ty);
115115
}
116116

117117
cir::PointerType getVoidPtrTy() {

clang/lib/CIR/CodeGen/CIRGenExpr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Address CIRGenFunction::emitAddrOfFieldStorage(Address base,
4242
mlir::Location loc = getLoc(field->getLocation());
4343

4444
mlir::Type fieldType = convertType(field->getType());
45-
auto fieldPtr = cir::PointerType::get(builder.getContext(), fieldType);
45+
auto fieldPtr = cir::PointerType::get(fieldType);
4646
// For most cases fieldName is the same as field->getName() but for lambdas,
4747
// which do not currently carry the name, so it can be passed down from the
4848
// CaptureStmt.

0 commit comments

Comments
 (0)