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

@ -278,10 +278,9 @@ DValue *DtoCastClass(const Loc &loc, DValue *val, Type *_to) {
LLValue *orig = DtoRVal(val);
LLValue *v = orig;
if (offset != 0) {
assert(offset > 0);
v = DtoBitCast(v, getVoidPtrType());
LLValue *off =
LLConstantInt::get(LLType::getInt32Ty(gIR->context()), offset);
v = gIR->ir->CreateGEP(v, off);
v = DtoGEP1(v, DtoConstUint(offset));
}
IF_LOG {
Logger::cout() << "V = " << *v << std::endl;