summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2015-07-24 03:36:55 +0000
committerMehdi Amini <mehdi.amini@apple.com>2015-07-24 03:36:55 +0000
commit5d8e569926773bea0e55d00a644c17ca202c29cc (patch)
treef5420b8d7b9e448aaebc025923f2c13608ef6bae /llvm/lib/CodeGen
parent5311a0b3636a75a2210547d0bc2f8e6366143b9c (diff)
downloadbcm5719-llvm-5d8e569926773bea0e55d00a644c17ca202c29cc.tar.gz
bcm5719-llvm-5d8e569926773bea0e55d00a644c17ca202c29cc.zip
Revert "Remove access to the DataLayout in the TargetMachine"
This reverts commit 0f720d984f419c747709462f7476dff962c0bc41. It breaks clang too badly, I need to prepare a proper patch for clang first. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 243089
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 8a0854628a6..ecdc7fa8b35 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -139,9 +139,9 @@ const DataLayout &AsmPrinter::getDataLayout() const {
return MMI->getModule()->getDataLayout();
}
-// 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(); }
+unsigned AsmPrinter::getPointerSize() const {
+ return TM.getDataLayout()->getPointerSize();
+}
const MCSubtargetInfo &AsmPrinter::getSubtargetInfo() const {
assert(MF && "getSubtargetInfo requires a valid MachineFunction!");
OpenPOWER on IntegriCloud