Add a test to check that the template instantiation during the template
specialization wouldn't be emitted again in the importer.
return true;
}
-export template<typename>
+template <typename T>
+struct u {
+ T unit() {
+ return T();
+ }
+};
+
+export template<typename T>
struct s {
static constexpr auto a = f();
static constexpr auto b = f();
int bar() {
return 44;
}
+ T zoo() {
+ return u<T>().unit();
+ }
};
template struct s<int>;
return _.foo();
}
+extern "C" long use3() {
+ s<long> _;
+ return _.zoo();
+}
+
// CHECK: define{{.*}}@use(
// CHECK-NOT: }
// CHECK: ret{{.*}} 4
// CHECK: declare{{.*}}@_ZNW1a1sIlE3fooEv
// CHECK-NOT: _ZNW1a1sIlE3barEv
+// CHECK: declare{{.*}}_ZNW1a1sIlE3zooEv