mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-13 04:24:40 +00:00
Add a TargetMachine hook that verifies DataLayout compatibility
Summary: Also provide the associated assertion when CodeGen starts. Reviewers: echristo Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11654 From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243682 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -85,6 +85,10 @@ MachineFunction::MachineFunction(const Function *F, const TargetMachine &TM,
|
||||
|
||||
FunctionNumber = FunctionNum;
|
||||
JumpTableInfo = nullptr;
|
||||
|
||||
assert(TM.isCompatibleDataLayout(getDataLayout()) &&
|
||||
"Can't create a MachineFunction using a Module with a "
|
||||
"Target-incompatible DataLayout attached\n");
|
||||
}
|
||||
|
||||
MachineFunction::~MachineFunction() {
|
||||
|
Reference in New Issue
Block a user