From a66fab4cea156e5a0eb58d05461f6561736a91bc Mon Sep 17 00:00:00 2001 From: Andrey Guskov Date: Wed, 25 Mar 2015 16:11:50 +0300 Subject: [PATCH] Fix for LLVM trunk (rL232885) --- ispc.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ispc.cpp b/ispc.cpp index 8741c8c7..393f639d 100644 --- a/ispc.cpp +++ b/ispc.cpp @@ -930,12 +930,10 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) : // 1. Get default data layout first std::string dl_string; -#if defined(LLVM_3_2) || defined(LLVM_3_3) || defined(LLVM_3_4) || defined(LLVM_3_5) - dl_string = m_targetMachine->getDataLayout()->getStringRepresentation(); -#elif defined(LLVM_3_6) +#if defined(LLVM_3_6) dl_string = m_targetMachine->getSubtargetImpl()->getDataLayout()->getStringRepresentation(); -#else // LLVM 3.7+ - dl_string = m_targetMachine->getSubtargetImpl()->getTargetLowering()->getDataLayout()->getStringRepresentation(); +#else // LLVM 3.5- and LLVM 3.7+ + dl_string = m_targetMachine->getDataLayout()->getStringRepresentation(); #endif // 2. Adjust for generic if (m_isa == Target::GENERIC) {