llvm-project/clang/test/CXX/module/codegen-basics.cppm
Chuanqi Xu d54888a3eb [Modules] Refactor modules-ts tests to use standard c++ modules
We're going to remove the support for modules-ts. But there are a lot of
tests which uses -fmodules-ts. We shouldn't remove them simply. This
patch refactor these tests to use standard c++ modules.
2023-02-16 14:05:16 +08:00

17 lines
477 B
C++

// RUN: %clang_cc1 -std=c++20 -triple=x86_64-linux-gnu -fmodules-codegen -emit-module-interface %s -o %t.pcm
// RUN: %clang_cc1 -std=c++20 -triple=x86_64-linux-gnu %t.pcm -emit-llvm -o - | FileCheck %s
export module FooBar;
export {
// CHECK-DAG: define{{.*}} i32 @_ZW6FooBar1fv(
int f() { return 0; }
}
// CHECK-DAG: define weak_odr void @_ZW6FooBar2f2v(
inline void f2() {}
// CHECK-DAG: define{{.*}} void @_ZL2f3v(
static void f3() {}
export void use_f3() { f3(); }