Avoid a few llvm::Type::getPointerElementType() usages

This commit is contained in:
Martin Kinkelin 2022-03-30 19:53:00 +02:00
parent 8527b3f9c8
commit e72c58d2c3
2 changed files with 2 additions and 3 deletions

View file

@ -144,7 +144,7 @@ void RTTIBuilder::push_funcptr(FuncDeclaration *fd, Type *castto) {
}
void RTTIBuilder::finalize(LLGlobalVariable *gvar) {
LLStructType *st = isaStruct(gvar->getType()->getPointerElementType());
LLStructType *st = isaStruct(gvar->getValueType());
assert(st);
// finalize the type if opaque (e.g., for ModuleInfos)