[llvm] [LLVM][IR] Add support for address space names in DataLayout (PR #170559)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 3 23:31:00 PST 2025
================
@@ -233,6 +231,15 @@ DataLayout &DataLayout::operator=(const DataLayout &Other) {
bool DataLayout::operator==(const DataLayout &Other) const {
// NOTE: StringRepresentation might differ, it is not canonicalized.
+ auto IsPointerSpecEqual = [this, &Other](const PointerSpec &A,
----------------
nikic wrote:
I think this is because getting the address space name requires the DataLayout object.
TBH I'm not sure whether this optimization is worthwhile -- DataLayout objects aren't really supposed to be copied, so maybe just storing as `std::string` would be "good enough"?
https://github.com/llvm/llvm-project/pull/170559
More information about the llvm-commits
mailing list