brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 9d996ae Raw
57 lines · plain
1// RUN: rm -rf %t2// RUN: mkdir -p %t3// RUN: split-file %s %t4//5// RUN: %clang_cc1 %t/a.cppm -std=c++20 -triple %itanium_abi_triple \6// RUN:     -emit-module-interface -o %t/a.pcm7// RUN: %clang_cc1 %t/b.cppm -std=c++20 -triple %itanium_abi_triple \8// RUN:     -emit-module-interface -o %t/b.pcm \9// RUN:     -fmodule-file=a=%t/a.pcm10// RUN: %clang_cc1 %t/b.pcm -std=c++20 -triple %itanium_abi_triple \11// RUN:     -fmodule-file=a=%t/a.pcm -emit-llvm -o - | FileCheck %t/b.cppm12 13// RUN: %clang_cc1 %t/a.cppm -std=c++20 -triple %itanium_abi_triple \14// RUN:     -emit-reduced-module-interface -o %t/a.pcm15// RUN: %clang_cc1 %t/b.cppm -std=c++20 -triple %itanium_abi_triple \16// RUN:     -emit-module-interface -o %t/b.pcm \17// RUN:     -fmodule-file=a=%t/a.pcm18// RUN: %clang_cc1 %t/b.pcm -std=c++20 -triple %itanium_abi_triple \19// RUN:     -fmodule-file=a=%t/a.pcm -emit-llvm -o - | FileCheck %t/b.cppm20 21//--- foo.h22namespace n {23 24template<typename>25struct s0 {26	static int m;27};28 29template<typename T>30struct s1 {31	using type = s0<T>;32};33 34}35 36template<typename T>37void require(n::s1<T>) {38}39 40//--- a.cppm41module;42 43#include "foo.h"44 45export module a;46 47//--- b.cppm48module;49 50#include "foo.h"51 52export module b;53import a;54 55// Check the LLVM IR of module 'b' get generated correctly.56// CHECK: define{{.*}}@_ZGIW1b57