Author: rafael Date: Tue Mar 20 08:42:58 2018 New Revision: 327991 URL: http://llvm.org/viewvc/llvm-project?rev=327991&view=rev Log: Set dso_local for guid decls.
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp cfe/trunk/test/CodeGenCXX/microsoft-templ-uuidof.cpp Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=327991&r1=327990&r2=327991&view=diff ============================================================================== --- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original) +++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Tue Mar 20 08:42:58 2018 @@ -1921,6 +1921,7 @@ ConstantAddress CodeGenModule::GetAddrOf /*isConstant=*/true, llvm::GlobalValue::LinkOnceODRLinkage, Init, Name); if (supportsCOMDAT()) GV->setComdat(TheModule.getOrInsertComdat(GV->getName())); + setDSOLocal(GV); return ConstantAddress(GV, Alignment); } Modified: cfe/trunk/test/CodeGenCXX/microsoft-templ-uuidof.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/microsoft-templ-uuidof.cpp?rev=327991&r1=327990&r2=327991&view=diff ============================================================================== --- cfe/trunk/test/CodeGenCXX/microsoft-templ-uuidof.cpp (original) +++ cfe/trunk/test/CodeGenCXX/microsoft-templ-uuidof.cpp Tue Mar 20 08:42:58 2018 @@ -15,6 +15,8 @@ struct __declspec(uuid("{BBBBBBBB-BBBB-B struct __declspec(uuid("{CCCCCCCC-CCCC-CCCC-CCCC-CCCCCCCCCCCC}")) C {}; +// CHECK-DAG: @_GUID_aaaaaaaa_aaaa_aaaa_aaaa_aaaaaaaaaaaa = linkonce_odr dso_local + const _GUID &xa = __uuidof(X<A>); // CHECK-DAG: @"?xa@@3ABU_GUID@@B" = {{.*}} @_GUID_aaaaaaaa_aaaa_aaaa_aaaa_aaaaaaaaaaaa _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits