support LLVM trunk after r202168 r202190 revisions

This commit is contained in:
Ilia Filippov
2014-02-26 17:06:58 +04:00
parent e95dfc7247
commit 06c06456c4
3 changed files with 20 additions and 8 deletions

View File

@@ -1098,8 +1098,8 @@ Module::writeObjectFileOrAssembly(llvm::TargetMachine *targetMachine,
}
llvm::PassManager pm;
#if defined(LLVM_3_1)
pm.add(new llvm::TargetData(*g->target->getDataLayout()));
#if defined(LLVM_3_5)
pm.add(new llvm::DataLayoutPass(*g->target->getDataLayout()));
#else
pm.add(new llvm::DataLayout(*g->target->getDataLayout()));
#endif