mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-14 15:16:07 +03:00
Avoid a few llvm::Type::getPointerElementType() usages
This commit is contained in:
parent
8527b3f9c8
commit
e72c58d2c3
2 changed files with 2 additions and 3 deletions
|
@ -144,7 +144,7 @@ void RTTIBuilder::push_funcptr(FuncDeclaration *fd, Type *castto) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void RTTIBuilder::finalize(LLGlobalVariable *gvar) {
|
void RTTIBuilder::finalize(LLGlobalVariable *gvar) {
|
||||||
LLStructType *st = isaStruct(gvar->getType()->getPointerElementType());
|
LLStructType *st = isaStruct(gvar->getValueType());
|
||||||
assert(st);
|
assert(st);
|
||||||
|
|
||||||
// finalize the type if opaque (e.g., for ModuleInfos)
|
// finalize the type if opaque (e.g., for ModuleInfos)
|
||||||
|
|
|
@ -76,8 +76,7 @@ LLConstant *IrAggr::getInitSymbol(bool define) {
|
||||||
assert(!initGlobal->hasInitializer() &&
|
assert(!initGlobal->hasInitializer() &&
|
||||||
"existing init symbol not expected to be defined");
|
"existing init symbol not expected to be defined");
|
||||||
assert((isBuiltinTypeInfo ||
|
assert((isBuiltinTypeInfo ||
|
||||||
initGlobal->getType()->getPointerElementType() ==
|
initGlobal->getValueType() == getLLStructType()) &&
|
||||||
getLLStructType()) &&
|
|
||||||
"type of existing init symbol declaration doesn't match");
|
"type of existing init symbol declaration doesn't match");
|
||||||
} else {
|
} else {
|
||||||
// Init symbols of built-in TypeInfos need to be kept mutable as the type
|
// Init symbols of built-in TypeInfos need to be kept mutable as the type
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue