mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-12-11 12:51:27 +00:00
- Fixed LLVM compile for LLVM 3.8 (Ubuntu)
This commit is contained in:
parent
cd21d017fb
commit
f32a2547bc
1 changed files with 3 additions and 3 deletions
|
@ -482,7 +482,7 @@ LLVMProgram::LLVMProgram()
|
||||||
|
|
||||||
mModule = std::make_unique<Module>("render", context());
|
mModule = std::make_unique<Module>("render", context());
|
||||||
mModule->setTargetTriple(targetTriple);
|
mModule->setTargetTriple(targetTriple);
|
||||||
#if LLVM_VERSION_MAJOR < 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR < 9)
|
#if LLVM_VERSION_MAJOR < 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR < 8)
|
||||||
mModule->setDataLayout(new DataLayout(*machine->getSubtargetImpl()->getDataLayout()));
|
mModule->setDataLayout(new DataLayout(*machine->getSubtargetImpl()->getDataLayout()));
|
||||||
#else
|
#else
|
||||||
mModule->setDataLayout(machine->createDataLayout());
|
mModule->setDataLayout(machine->createDataLayout());
|
||||||
|
@ -497,7 +497,7 @@ void LLVMProgram::CreateEE()
|
||||||
legacy::FunctionPassManager PerFunctionPasses(mModule.get());
|
legacy::FunctionPassManager PerFunctionPasses(mModule.get());
|
||||||
legacy::PassManager PerModulePasses;
|
legacy::PassManager PerModulePasses;
|
||||||
|
|
||||||
#if LLVM_VERSION_MAJOR > 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 9)
|
#if LLVM_VERSION_MAJOR > 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 8)
|
||||||
PerFunctionPasses.add(createTargetTransformInfoWrapperPass(machine->getTargetIRAnalysis()));
|
PerFunctionPasses.add(createTargetTransformInfoWrapperPass(machine->getTargetIRAnalysis()));
|
||||||
PerModulePasses.add(createTargetTransformInfoWrapperPass(machine->getTargetIRAnalysis()));
|
PerModulePasses.add(createTargetTransformInfoWrapperPass(machine->getTargetIRAnalysis()));
|
||||||
#endif
|
#endif
|
||||||
|
@ -542,7 +542,7 @@ std::string LLVMProgram::DumpModule()
|
||||||
{
|
{
|
||||||
std::string str;
|
std::string str;
|
||||||
llvm::raw_string_ostream stream(str);
|
llvm::raw_string_ostream stream(str);
|
||||||
#if LLVM_VERSION_MAJOR < 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR < 9)
|
#if LLVM_VERSION_MAJOR < 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR < 8)
|
||||||
mModule->print(stream, nullptr);
|
mModule->print(stream, nullptr);
|
||||||
#else
|
#else
|
||||||
mModule->print(stream, nullptr, false, true);
|
mModule->print(stream, nullptr, false, true);
|
||||||
|
|
Loading…
Reference in a new issue