mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-01 15:40:55 +03:00
Use typed GEP in functions.cpp
(#4072)
This commit is contained in:
parent
194dfc91f0
commit
2dd2f7fc15
1 changed files with 1 additions and 1 deletions
|
@ -1291,7 +1291,7 @@ void DtoDefineFunction(FuncDeclaration *fd, bool linkageAvailableExternally) {
|
||||||
LLType *targetThisType = thismem->getType();
|
LLType *targetThisType = thismem->getType();
|
||||||
thismem = DtoBitCast(thismem, getVoidPtrType());
|
thismem = DtoBitCast(thismem, getVoidPtrType());
|
||||||
auto off = DtoConstInt(-fd->interfaceVirtual->offset);
|
auto off = DtoConstInt(-fd->interfaceVirtual->offset);
|
||||||
thismem = DtoGEP1(thismem, off);
|
thismem = DtoGEP1(llvm::Type::getInt8Ty(gIR->context()), thismem, off);
|
||||||
thismem = DtoBitCast(thismem, targetThisType);
|
thismem = DtoBitCast(thismem, targetThisType);
|
||||||
}
|
}
|
||||||
thismem = DtoAllocaDump(thismem, 0, "this");
|
thismem = DtoAllocaDump(thismem, 0, "this");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue