llvm-capstone/clang/test/Modules/language-linkage.cppm
Chuanqi Xu f8d5f0e53b [NFC] Add two tests for C++ modules
One test for checking the decls in language linkage shouldn't be
discarded and can be mangled correctly.

Another one for checking we can't export again in an export decl.
2023-02-16 17:02:04 +08:00

19 lines
492 B
C++

// Make sure that the declarations inside the language linkage can
// be generated correctly.
//
// RUN: rm -fr %t
// RUN: mkdir %t
//
// RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple %s -emit-module-interface -o %t/M.pcm
// RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple %t/M.pcm -S -emit-llvm -disable-llvm-passes -o - | FileCheck %s
export module M;
extern "C++" {
void foo() {}
}
extern "C" void bar() {}
// CHECK: define {{.*}}@bar(
// CHECK: define {{.*}}@_Z3foov(