Fix for LLVM trunk (rL232885)

This commit is contained in:
Andrey Guskov
2015-03-25 16:11:50 +03:00
parent 603355f6d6
commit a66fab4cea

View File

@@ -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) {