1// RUN: %clang_cc1 -std=c++20 %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s
2
3module;
4# 5 __FILE__ 1
5class Pooh;
6class Piglet;
7# 8 "" 2
8
9export module std; // might happen, you can't say it won't!
10
11namespace std {
12export template<typename T> class allocator {
13// just for testing, not real!
14void M (T *);
15template <typename U> U *N (T *);
16};
17
18template<typename T> void allocator<T>::M (T *) {}
19template<typename T> template<typename U> U *allocator<T>::N (T *) {
20return nullptr;
21}
22
23// CHECK-DAG: void @_ZNStW3std9allocatorIiE1MEPi(
24template void allocator<int>::M (int *);
25// CHECK-DAG: @_ZNStW3std9allocatorIiE1NIfEEPT_Pi(
26template float *allocator<int>::N<float> (int *);
27}
28
29// CHECK-DAG: @_ZNStW3std9allocatorI4PoohE1MEPS1_(
30template void std::allocator<Pooh>::M (Pooh *);
31// CHECK-DAG: @_ZNStW3std9allocatorI4PoohE1NI6PigletEEPT_PS1_(
32template Piglet *std::allocator<Pooh>::N<Piglet> (Pooh *);
33