[llvm-branch-commits] [llvm] TargetMachine: Remove DataLayout field (PR #226407)
Alexis Engelke via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Sep 25 03:04:08 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()));
----------------
aengelke wrote:
The module is first seen in the first pass of the codegen pipeline. Without any check whether the module has the correct data layout, there's no safe guard against users using a module with an invalid data layout; this check *did* catch such problems in practice.
https://github.com/llvm/llvm-project/pull/226407
More information about the llvm-branch-commits
mailing list