Use a trivial comdat for C++ tables.
This produces comdats for vtables, typeinfo, typeinfo names, and vtts. When combined with llvm not producing implicit comdats, not doing this would cause code bloat on ELF and link errors on COFF. llvm-svn: 226227
This commit is contained in:
@@ -1828,7 +1828,10 @@ CodeGenModule::CreateOrReplaceCXXRuntimeVariable(StringRef Name,
|
||||
|
||||
OldGV->eraseFromParent();
|
||||
}
|
||||
|
||||
|
||||
if (supportsCOMDAT() && GV->isWeakForLinker())
|
||||
GV->setComdat(TheModule.getOrInsertComdat(GV->getName()));
|
||||
|
||||
return GV;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user