mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
Redirect pointerSize query to the TargetMachine in ASMPrinter
Summary: Because llvm-dsymutil is using ASMPrinter without any MachineFunction of Module available. 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. Reviewers: echristo Subscribers: yaron.keren, rafael, llvm-commits Differential Revision: http://reviews.llvm.org/D11078 From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242384 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -140,6 +140,8 @@ const DataLayout &AsmPrinter::getDataLayout() const {
|
||||
return *TM.getDataLayout();
|
||||
}
|
||||
|
||||
unsigned AsmPrinter::getPointerSize() const { return TM.getDataLayout()->getPointerSize(); }
|
||||
|
||||
const MCSubtargetInfo &AsmPrinter::getSubtargetInfo() const {
|
||||
assert(MF && "getSubtargetInfo requires a valid MachineFunction!");
|
||||
return MF->getSubtarget<MCSubtargetInfo>();
|
||||
|
Reference in New Issue
Block a user