const char *VTableName = nullptr;
+ const CXXRecordDecl *RD = nullptr;
switch (Ty->getTypeClass()) {
#define TYPE(Class, Base)
#define ABSTRACT_TYPE(Class, Base)
break;
case Type::Record: {
- const CXXRecordDecl *RD =
- cast<CXXRecordDecl>(cast<RecordType>(Ty)->getDecl());
+ RD = cast<CXXRecordDecl>(cast<RecordType>(Ty)->getDecl());
if (!RD->hasDefinition() || !RD->getNumBases()) {
VTableName = ClassTypeInfo;
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());
// 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