blob: 5d573d6e829b765b2d44812eb62fc5f00db987cb [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
Anders Carlsson548e60e2009-12-10 22:25:34 +00002template<typename T> struct A {
3 virtual void f(T) { }
4 inline void g() { }
5};
6
7// Explicit instantiations have external linkage.
8
9// CHECK: define void @_ZN1AIiE1gEv(
10template void A<int>::g();
11
12// CHECK: define void @_ZN1AIfE1fEf(
13// CHECK: define void @_ZN1AIfE1gEv(
14// FIXME: This should also emit the vtable.
15template struct A<float>;
16
17// CHECK: define void @_Z1fIiEvT_
18template <typename T> void f(T) { }
19template void f<int>(int);
20
21// CHECK: define void @_Z1gIiEvT_
22template <typename T> inline void g(T) { }
23template void g<int>(int);
24