xref: /llvm-project/clang/test/Modules/language-linkage.cppm (revision c5de4dd1eab00df76c1a68c5f397304ceacb71f2)
1// Make sure that the declarations inside the language linkage can
2// be generated correctly.
3//
4// RUN: rm -fr %t
5// RUN: mkdir %t
6//
7// RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple %s -emit-module-interface -o %t/M.pcm
8// RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple %t/M.pcm -emit-llvm -disable-llvm-passes -o - | FileCheck %s
9export module M;
10
11extern "C++" {
12void foo() {}
13}
14
15extern "C" void bar() {}
16
17// CHECK: define {{.*}}@_Z3foov(
18// CHECK: define {{.*}}@bar(
19