@@ -135,6 +135,8 @@ LLGlobalVariable * IrAggr::getInterfaceArraySymbol()
135
135
name.append (cd->mangle ());
136
136
name.append (" 16__interfaceInfosZ" );
137
137
138
+ // We keep this as external for now and only consider template linkage if
139
+ // we emit the initializer later.
138
140
classInterfacesArray = getOrCreateGlobal (cd->loc , *gIR ->module ,
139
141
array_type, true , llvm::GlobalValue::ExternalLinkage, NULL , name);
140
142
@@ -292,7 +294,6 @@ llvm::GlobalVariable * IrAggr::getInterfaceVtbl(BaseClass * b, bool new_instance
292
294
};
293
295
294
296
llvm::GlobalVariable* interfaceInfosZ = getInterfaceArraySymbol ();
295
- interfaceInfosZ->setLinkage (DtoExternalLinkage (cd, false ));
296
297
llvm::Constant* c = llvm::ConstantExpr::getGetElementPtr (
297
298
interfaceInfosZ, idxs, true );
298
299
@@ -484,6 +485,7 @@ LLConstant * IrAggr::getClassInfoInterfaces()
484
485
// create and apply initializer
485
486
LLConstant* arr = LLConstantArray::get (array_type, constants);
486
487
classInterfacesArray->setInitializer (arr);
488
+ classInterfacesArray->setLinkage (DtoExternalLinkage (cd, false ));
487
489
488
490
// return null, only baseclass provide interfaces
489
491
if (cd->vtblInterfaces ->dim == 0 )
0 commit comments