-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[CIR] Remove inferred context from pointer type getters #138858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
@llvm/pr-subscribers-clang @llvm/pr-subscribers-clangir Author: Henrich Lauko (xlauko) ChangesThis mirror incubator changes from llvm/clangir#1600 Full diff: https://github.com/llvm/llvm-project/pull/138858.diff 2 Files Affected:
diff --git a/clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h b/clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h
index d96a1394b97f2..a63bf4f8858d0 100644
--- a/clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h
+++ b/clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h
@@ -111,7 +111,7 @@ class CIRBaseBuilderTy : public mlir::OpBuilder {
cir::BoolType getBoolTy() { return cir::BoolType::get(getContext()); }
cir::PointerType getPointerTo(mlir::Type ty) {
- return cir::PointerType::get(getContext(), ty);
+ return cir::PointerType::get(ty);
}
cir::PointerType getVoidPtrTy() {
diff --git a/clang/lib/CIR/CodeGen/CIRGenExpr.cpp b/clang/lib/CIR/CodeGen/CIRGenExpr.cpp
index 94a6c03f7f1a4..67196f9f949c1 100644
--- a/clang/lib/CIR/CodeGen/CIRGenExpr.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenExpr.cpp
@@ -42,7 +42,7 @@ Address CIRGenFunction::emitAddrOfFieldStorage(Address base,
mlir::Location loc = getLoc(field->getLocation());
mlir::Type fieldType = convertType(field->getType());
- auto fieldPtr = cir::PointerType::get(builder.getContext(), fieldType);
+ auto fieldPtr = cir::PointerType::get(fieldType);
// For most cases fieldName is the same as field->getName() but for lambdas,
// which do not currently carry the name, so it can be passed down from the
// CaptureStmt.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This mirror changes from llvm/clangir#1600
e9b719b
to
f875b20
Compare
This mirror incubator changes from llvm/clangir#1600