[Mlir-commits] [flang] [mlir] [mlir][LLVM] Make struct types immutable (PR #116035)
Tobias Gysi
llvmlistbot at llvm.org
Sat Nov 16 03:45:03 PST 2024
Markus =?utf-8?q?Böck?= <markus.boeck02 at gmail.com>,
Markus =?utf-8?q?Böck?= <markus.boeck02 at gmail.com>,
Markus =?utf-8?q?Böck?= <markus.boeck02 at gmail.com>,
Markus =?utf-8?q?Böck?= <markus.boeck02 at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/116035 at github.com>
================
@@ -156,8 +146,8 @@ std::optional<llvm::LogicalResult> LLVMTypeConverter::convertRecordType(
else
members.push_back(mlir::cast<mlir::Type>(convertType(mem.second)));
}
- if (mlir::failed(st.setBody(members, /*isPacked=*/false)))
- return mlir::failure();
+ auto st = mlir::LLVM::LLVMStructType::get(&getContext(), name, members,
----------------
gysit wrote:
```suggestion
auto structType = mlir::LLVM::LLVMStructType::get(&getContext(), name, members,
```
ultra nit: I would spell out
https://github.com/llvm/llvm-project/pull/116035
More information about the Mlir-commits
mailing list