Fix LLVM 5.0 compilation.

This commit is contained in:
Johan Engelen 2017-04-13 22:00:00 +02:00
parent 3c297dcc06
commit 64df1687a8
8 changed files with 52 additions and 15 deletions

View file

@ -978,8 +978,12 @@ void DtoDefineFunction(FuncDeclaration *fd, bool linkageAvailableExternally) {
// create alloca point
// this gets erased when the function is complete, so alignment etc does not
// matter at all
llvm::Instruction *allocaPoint = new llvm::AllocaInst(
LLType::getInt32Ty(gIR->context()), "alloca point", beginbb);
llvm::Instruction *allocaPoint =
new llvm::AllocaInst(LLType::getInt32Ty(gIR->context()),
#if LDC_LLVM_VER >= 500
0, // Address space
#endif
"alloca point", beginbb);
funcGen.allocapoint = allocaPoint;
// debug info - after all allocas, but before any llvm.dbg.declare etc