r328288 - Bring r328238 back with a fix.
Rafael Espindola via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 22 18:36:23 PDT 2018
Author: rafael
Date: Thu Mar 22 18:36:23 2018
New Revision: 328288
URL: http://llvm.org/viewvc/llvm-project?rev=328288&view=rev
Log:
Bring r328238 back with a fix.
The issues was that we were setting hidden visibility if, when
processing a hidden class, we found out that we needed to emit a
reference to a vtable provided by the standard library.
Original message:
Set dso_local on vtables.
Modified:
cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp
cfe/trunk/test/CodeGenCXX/dllexport.cpp
Modified: cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp?rev=328288&r1=328287&r2=328288&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp (original)
+++ cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp Thu Mar 22 18:36:23 2018
@@ -2948,6 +2948,7 @@ void ItaniumRTTIBuilder::BuildVTablePoin
llvm::Constant *VTable =
CGM.getModule().getOrInsertGlobal(VTableName, CGM.Int8PtrTy);
+ CGM.setDSOLocal(cast<llvm::GlobalValue>(VTable->stripPointerCasts()));
llvm::Type *PtrDiffTy =
CGM.getTypes().ConvertType(CGM.getContext().getPointerDiffType());
Modified: cfe/trunk/test/CodeGenCXX/dllexport.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/dllexport.cpp?rev=328288&r1=328287&r2=328288&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/dllexport.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/dllexport.cpp Thu Mar 22 18:36:23 2018
@@ -43,6 +43,8 @@ __declspec(dllexport) extern int ExternG
// M64-DAG: @__ImageBase = external dso_local constant i8
+// GNU-DAG: @_ZTVN10__cxxabiv117__class_type_infoE = external dso_local global
+
// dllexport implies a definition.
// MSC-DAG: @"?GlobalDef@@3HA" = dso_local dllexport global i32 0, align 4
// GNU-DAG: @GlobalDef = dso_local dllexport global i32 0, align 4
More information about the cfe-commits
mailing list