================
@@ -1849,6 +1849,9 @@ void CGOpenMPRuntime::emitAndRegisterVTable(CodeGenModule 
&CGM,
       CGM.EmitVTable(CXXRecord);
       CodeGenVTables VTables = CGM.getVTables();
       llvm::GlobalVariable *VTablesAddr = VTables.GetAddrOfVTable(CXXRecord);
+      // Must set VTables to weak since we're emitting them in multiple TUs now
+      if (VTablesAddr->hasExternalLinkage())
+        VTablesAddr->setLinkage(llvm::GlobalValue::WeakODRLinkage);
----------------
linuxrocks123 wrote:

Moved after assertion (will push soon).  From 
`CodeGenModule::getVTableLinkage`, it looks like WeakODRLinkage is the correct 
linkage type to use for VTables that can't be discarded.

https://github.com/llvm/llvm-project/pull/200942
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to