Fix LLVM 13 deprecation messages during build

This commit is contained in:
Martin Kinkelin 2022-02-26 16:54:03 +01:00 committed by Martin Kinkelin
parent 75b67452cb
commit 7b6810b01b
10 changed files with 72 additions and 30 deletions

View file

@ -164,7 +164,11 @@ LLFunction *build_module_reference_and_ctor(const char *moduleMangle,
gIR->DBuilder.EmitModuleCTor(ctor, fname.c_str());
// get current beginning
LLValue *curbeg = builder.CreateLoad(mref, "current");
LLValue *curbeg = builder.CreateLoad(
#if LDC_LLVM_VER >= 800
modulerefPtrTy,
#endif
mref, "current");
// put current beginning as the next of this one
LLValue *gep = builder.CreateStructGEP(