mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-22 10:24:26 +00:00
Move most user of TargetMachine::getDataLayout to the Module one
Summary: This change is part of a series of commits dedicated to have a single DataLayout during compilation by using always the one owned by the module. This patch is quite boring overall, except for some uglyness in ASMPrinter which has a getDataLayout function but has some clients that use it without a Module (llmv-dsymutil, llvm-dwarfdump), so some methods are taking a DataLayout as parameter. Reviewers: echristo Subscribers: yaron.keren, rafael, llvm-commits, jholewinski Differential Revision: http://reviews.llvm.org/D11090 From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242386 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -94,7 +94,9 @@ StackMaps::parseOperand(MachineInstr::const_mop_iterator MOI,
|
||||
default:
|
||||
llvm_unreachable("Unrecognized operand type.");
|
||||
case StackMaps::DirectMemRefOp: {
|
||||
unsigned Size = AP.TM.getDataLayout()->getPointerSizeInBits();
|
||||
auto &DL = AP.MF->getDataLayout();
|
||||
|
||||
unsigned Size = DL.getPointerSizeInBits();
|
||||
assert((Size % 8) == 0 && "Need pointer size in bytes.");
|
||||
Size /= 8;
|
||||
unsigned Reg = (++MOI)->getReg();
|
||||
|
Reference in New Issue
Block a user