summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/BackendUtil.cpp
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2015-07-24 16:04:29 +0000
committerMehdi Amini <mehdi.amini@apple.com>2015-07-24 16:04:29 +0000
commitca3cf9e6ff1f4b9f64f51c783ac8cc459090cd4f (patch)
treee4a2430db1b1e63e25652f56e79fba86dca9073a /clang/lib/CodeGen/BackendUtil.cpp
parent26d481311a6e8c6f347f2fdb259399f60a74209e (diff)
downloadbcm5719-llvm-ca3cf9e6ff1f4b9f64f51c783ac8cc459090cd4f.tar.gz
bcm5719-llvm-ca3cf9e6ff1f4b9f64f51c783ac8cc459090cd4f.zip
LLVM API Change: the Module always owns the DataLayout
From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 243115
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r--clang/lib/CodeGen/BackendUtil.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index 5754bb63dd7..90da637ab80 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -608,7 +608,7 @@ void EmitAssemblyHelper::EmitAssembly(BackendAction Action,
if (UsesCodeGen && !TM)
return;
if (TM)
- TheModule->setDataLayout(*TM->getDataLayout());
+ TheModule->setDataLayout(TM->createDataLayout());
CreatePasses();
switch (Action) {
@@ -670,8 +670,7 @@ void clang::EmitBackendOutput(DiagnosticsEngine &Diags,
// If an optional clang TargetInfo description string was passed in, use it to
// verify the LLVM TargetMachine's DataLayout.
if (AsmHelper.TM && !TDesc.empty()) {
- std::string DLDesc =
- AsmHelper.TM->getDataLayout()->getStringRepresentation();
+ std::string DLDesc = M->getDataLayout().getStringRepresentation();
if (DLDesc != TDesc) {
unsigned DiagID = Diags.getCustomDiagID(
DiagnosticsEngine::Error, "backend data layout '%0' does not match "
OpenPOWER on IntegriCloud