brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · f4b42b4 Raw
57 lines · plain
1// RUN: rm -rf %t2// RUN: split-file %s %t3// RUN: cd %t4//5// RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \6// RUN:     %t/a.cppm -emit-module-interface -o %t/a.pcm7// RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \8// RUN:     %t/use.cpp -fmodule-file=a=%t/a.pcm -verify -fsyntax-only9// RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \10// RUN:     %t/a.pcm -emit-llvm -o - | FileCheck %t/a.ll11//12// RUN: echo "//Update" >> %t/foo.h13// RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \14// RUN:     %t/use.cpp -fmodule-file=a=%t/a.pcm -verify -fsyntax-only15// RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \16// RUN:     %t/a.pcm -emit-llvm -o - | FileCheck %t/a.ll17//18// RUN: echo "//Update" >> %t/a.cppm19// RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \20// RUN:     %t/use.cpp -fmodule-file=a=%t/a.pcm -verify -fsyntax-only21// RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \22// RUN:     %t/a.pcm -emit-llvm -o - | FileCheck %t/a.ll23//24// RUN: rm -f %t/foo.h25// RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \26// RUN:     %t/use.cpp -fmodule-file=a=%t/a.pcm -verify -fsyntax-only27// RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \28// RUN:     %t/a.pcm -emit-llvm -o - | FileCheck %t/a.ll29//30// RUN: rm -f %t/a.cppm31// RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \32// RUN:     %t/use.cpp -fmodule-file=a=%t/a.pcm -verify -fsyntax-only33// RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \34// RUN:     %t/a.pcm -emit-llvm -o - | FileCheck %t/a.ll35 36//--- foo.h37inline int foo = 43;38 39//--- a.cppm40// expected-no-diagnostics41module;42#include "foo.h"43export module a;44export using ::foo;45 46//--- a.ll47// check the LLVM IR are generated succesfully.48// CHECK: define{{.*}}@_ZGIW1a49 50//--- use.cpp51// expected-no-diagnostics52import a;53int use() {54    return foo;55}56 57