[llvm] TargetMachine: Remove DataLayout field (PR #226407)
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 2 17:00:23 PDT 2026
================
@@ -246,15 +245,6 @@ void MachineFunction::init() {
WinEHInfo = new (Allocator) WinEHFuncInfo();
}
- if (!Target.isCompatibleDataLayout(getDataLayout())) {
- report_fatal_error(
- formatv("Can't create a MachineFunction using a Module with a "
- "Target-incompatible DataLayout attached\n Target "
- "DataLayout: {0}\n Module DataLayout: {1}\n",
- Target.createDataLayout().getStringRepresentation(),
- getDataLayout().getStringRepresentation()));
----------------
rnk wrote:
Is this something the verifier can do for us now that we can compute datalayout from the Triple + ABIName? That's our usual approach: have the tool run the verifier on untrusted inputs that could come from other toolchains (older compilers, other frontends), and then turn it off during codegen.
https://github.com/llvm/llvm-project/pull/226407
More information about the llvm-commits
mailing list