[llvm] [DataLayout] Remove `clear` and `reset` methods (NFC) (PR #102993)

Tim Besard via llvm-commits llvm-commits at lists.llvm.org
Fri May 16 02:02:39 PDT 2025


maleadt wrote:

This inadvertently caused some issues with the Julia JIT, where we used `DataLayout::reset` to replace a TargetMachine's data layout with one that marks certain address spaces as non-integral. I realize that isn't kosher, so what would be the "proper" way of creating a TargetMachine with a custom DataLayout? `createTargetMachine` doesn't have any customization.

FWIW, ignoring the mismatch between the TM's data layout and the one we use on modules causes issues down the line, e.g., when MachineFunction asserts that both match: https://github.com/llvm/llvm-project/blob/22576e2ccec60af6d27d8fd95ad3ca721b914815/llvm/lib/CodeGen/MachineFunction.cpp#L243-L245

https://github.com/llvm/llvm-project/pull/102993


More information about the llvm-commits mailing list