CodeGen: Compiler generated __declspec(uuid) objects should be COMDAT'd
llvm-svn: 226628
This commit is contained in:
@@ -1274,6 +1274,8 @@ llvm::Constant *CodeGenModule::GetAddrOfUuidDescriptor(
|
||||
auto *GV = new llvm::GlobalVariable(
|
||||
getModule(), Init->getType(),
|
||||
/*isConstant=*/true, llvm::GlobalValue::LinkOnceODRLinkage, Init, Name);
|
||||
if (supportsCOMDAT())
|
||||
GV->setComdat(TheModule.getOrInsertComdat(GV->getName()));
|
||||
return GV;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user