mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-01 15:40:55 +03:00
Fix LLVM 13 deprecation messages during build
This commit is contained in:
parent
75b67452cb
commit
7b6810b01b
10 changed files with 72 additions and 30 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue