diff options
author | Mehdi Amini <mehdi.amini@apple.com> | 2015-07-16 06:11:10 +0000 |
---|---|---|
committer | Mehdi Amini <mehdi.amini@apple.com> | 2015-07-16 06:11:10 +0000 |
commit | bd7287ebe5d13183fb274057727e5380c1c1bd4f (patch) | |
tree | 94c733f89ca4a1ce07dbe77cd0022b9975ccf0a2 /llvm/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp | |
parent | 5c0fa58e91cffdc0b7a1024890533942876d5691 (diff) | |
download | bcm5719-llvm-bd7287ebe5d13183fb274057727e5380c1c1bd4f.tar.gz bcm5719-llvm-bd7287ebe5d13183fb274057727e5380c1c1bd4f.zip |
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>
llvm-svn: 242386
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp index 2ceec61ab5c..c09ef6adea6 100644 --- a/llvm/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp @@ -93,7 +93,7 @@ void OcamlGCMetadataPrinter::beginAssembly(Module &M, GCModuleInfo &Info, /// void OcamlGCMetadataPrinter::finishAssembly(Module &M, GCModuleInfo &Info, AsmPrinter &AP) { - unsigned IntPtrSize = AP.TM.getDataLayout()->getPointerSize(); + unsigned IntPtrSize = M.getDataLayout().getPointerSize(); AP.OutStreamer->SwitchSection(AP.getObjFileLowering().getTextSection()); EmitCamlGlobal(M, AP, "code_end"); |