r328242 - Revert "Set dso_local on vtables."

Rafael Espindola via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 22 14:14:17 PDT 2018


Author: rafael
Date: Thu Mar 22 14:14:16 2018
New Revision: 328242

URL: http://llvm.org/viewvc/llvm-project?rev=328242&view=rev
Log:
Revert "Set dso_local on vtables."

This reverts commit r328238.

Looks like it broke some buildbots.

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=328242&r1=328241&r2=328242&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp (original)
+++ cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp Thu Mar 22 14:14:16 2018
@@ -2848,7 +2848,6 @@ void ItaniumRTTIBuilder::BuildVTablePoin
 
   const char *VTableName = nullptr;
 
-  const CXXRecordDecl *RD = nullptr;
   switch (Ty->getTypeClass()) {
 #define TYPE(Class, Base)
 #define ABSTRACT_TYPE(Class, Base)
@@ -2900,7 +2899,8 @@ void ItaniumRTTIBuilder::BuildVTablePoin
     break;
 
   case Type::Record: {
-    RD = cast<CXXRecordDecl>(cast<RecordType>(Ty)->getDecl());
+    const CXXRecordDecl *RD =
+      cast<CXXRecordDecl>(cast<RecordType>(Ty)->getDecl());
 
     if (!RD->hasDefinition() || !RD->getNumBases()) {
       VTableName = ClassTypeInfo;
@@ -2948,7 +2948,6 @@ void ItaniumRTTIBuilder::BuildVTablePoin
 
   llvm::Constant *VTable =
     CGM.getModule().getOrInsertGlobal(VTableName, CGM.Int8PtrTy);
-  CGM.setGVProperties(cast<llvm::GlobalValue>(VTable->stripPointerCasts()), RD);
 
   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=328242&r1=328241&r2=328242&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/dllexport.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/dllexport.cpp Thu Mar 22 14:14:16 2018
@@ -41,8 +41,6 @@ struct External { int v; };
 // GNU-NOT: @ExternGlobalDecl
 __declspec(dllexport) extern int ExternGlobalDecl;
 
-// 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