// Based on C++20 10.2 example 5.
// RUN: rm -rf %t
// RUN: mkdir -p %t
// RUN: split-file %s %t
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/std-10-2-ex5-tu1.cpp \
// RUN: -o %t/M.pcm
// RUN: %clang_cc1 -std=c++20 -emit-obj %t/std-10-2-ex5-tu2.cpp \
// RUN: -fmodule-file=%t/M.pcm -o %t/tu-2.o
// RUN: %clang_cc1 -std=c++20 -emit-obj %t/std-10-2-ex5-tu3.cpp \
// RUN: -fmodule-file=%t/M.pcm -verify -o %t/main.o
//--- std-10-2-ex5-tu1.cpp
export module M;
export ;
// namespace
export void ; // OK
;
export T ; // OK
export ; // A exported as incomplete
export auto
export const int n = 5; // OK, n has external linkage
//--- std-10-2-ex5-tu2.cpp
module M;
;
//--- std-10-2-ex5-tu3.cpp
import M;
int