llvm-project/clang/test/CodeGenCXX/virt-template-vtable.cpp
Rafael Espindola 922f2aa9b2 Bring r325915 back.
The tests that failed on a windows host have been fixed.

Original message:

Start setting dso_local for COFF.

With this there are still some GVs where we don't set dso_local
because setGVProperties is never called. I intend to fix that in
followup commits. This is just the bare minimum to teach
shouldAssumeDSOLocal what it should do for COFF.

llvm-svn: 325940
2018-02-23 19:30:48 +00:00

33 lines
717 B
C++

// RUN: %clang_cc1 %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s
template<class T> class A {
public:
A() {}
virtual void a() {}
};
class B : A<int> {
B();
};
B::B() {}
template class A<long>;
extern template class A<short>;
template class A<short>;
// CHECK: @_ZTV1B = linkonce_odr {{(dso_local )?}}unnamed_addr constant
// CHECK: @_ZTV1AIlE = weak_odr {{(dso_local )?}}unnamed_addr constant
// CHECK: @_ZTV1AIsE = weak_odr {{(dso_local )?}}unnamed_addr constant
// CHECK: @_ZTV1AIiE = linkonce_odr {{(dso_local )?}}unnamed_addr constant
template<class T> struct C {
virtual void c() {}
};
struct D : C<int> {
virtual void d();
};
void D::d() {}
// CHECK: define {{.*}}@_ZN1CIiE1cEv(