mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Remove access to the DataLayout in the TargetMachine
Summary: Replace getDataLayout() with a createDataLayout() method to make explicit that it is intended to create a DataLayout only and not accessing it for other purpose. This change is the last 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: jholewinski, llvm-commits, rafael, yaron.keren Differential Revision: http://reviews.llvm.org/D11103 (cherry picked from commit 5609fc56bca971e5a7efeaa6ca4676638eaec5ea) From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243083 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -139,9 +139,9 @@ const DataLayout &AsmPrinter::getDataLayout() const {
|
||||
return MMI->getModule()->getDataLayout();
|
||||
}
|
||||
|
||||
unsigned AsmPrinter::getPointerSize() const {
|
||||
return TM.getDataLayout()->getPointerSize();
|
||||
}
|
||||
// Do not use the cached DataLayout because some client use it without a Module
|
||||
// (llmv-dsymutil, llvm-dwarfdump).
|
||||
unsigned AsmPrinter::getPointerSize() const { return TM.getPointerSize(); }
|
||||
|
||||
const MCSubtargetInfo &AsmPrinter::getSubtargetInfo() const {
|
||||
assert(MF && "getSubtargetInfo requires a valid MachineFunction!");
|
||||
|
Reference in New Issue
Block a user