handle visibility properly. Fixes <rdar://problem/
8091955>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105977
91177308-0d34-0410-b5e6-
96231b3b80d8
// Set the correct linkage.
VTable->setLinkage(Linkage);
+
+ // Set the right visibility.
+ CGM.setGlobalVisibility(VTable, RD);
}
llvm::GlobalVariable *
#define DEFAULT __attribute__((visibility("default")))
// CHECK: @_ZN5Test425VariableInHiddenNamespaceE = hidden global i32 10
-
+// CHECK: @_ZTVN5Test63fooE = weak_odr hidden constant
namespace Test1 {
// CHECK: define hidden void @_ZN5Test11fEv
void HIDDEN f() { }
void g() { }
}
}
+
+// <rdar://problem/8091955>
+namespace Test6 {
+ struct HIDDEN foo {
+ foo() { }
+ void bonk();
+ virtual void bar() = 0;
+
+ virtual void zonk() {}
+ };
+
+ struct barc : public foo {
+ barc();
+ virtual void bar();
+ };
+
+ barc::barc() {}
+}