From: Eric Christopher Date: Mon, 4 Aug 2014 21:33:42 +0000 (+0000) Subject: Update for LLVM API change. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b3b9c09c6c58877358f25b610c6c2f2cf64fde0a;p=clang Update for LLVM API change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214786 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp index cec48f35a2..886c379839 100644 --- a/lib/CodeGen/BackendUtil.cpp +++ b/lib/CodeGen/BackendUtil.cpp @@ -33,6 +33,7 @@ #include "llvm/Target/TargetLibraryInfo.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetOptions.h" +#include "llvm/Target/TargetSubtargetInfo.h" #include "llvm/Transforms/IPO.h" #include "llvm/Transforms/IPO/PassManagerBuilder.h" #include "llvm/Transforms/Instrumentation.h" @@ -600,8 +601,9 @@ 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 = AsmHelper.TM->getSubtargetImpl() + ->getDataLayout() + ->getStringRepresentation(); if (DLDesc != TDesc) { unsigned DiagID = Diags.getCustomDiagID( DiagnosticsEngine::Error, "backend data layout '%0' does not match "