xref: /llvm-project/clang/test/CodeGenCXX/module-extern-C.cpp (revision 4168efe1b2243ed31c30c82583a18bff78cfa076)
1 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s
2 
3 module;
4 
5 #include "Inputs/module-extern-C.h"
6 
7 export module x;
8 
9 // CHECK: void @foo()
foo()10 extern "C" void foo() {
11   return;
12 }
13 
14 extern "C" {
15 // CHECK: void @bar()
bar()16 void bar() {
17   return;
18 }
19 // CHECK: i32 @baz()
baz()20 int baz() {
21   return 3;
22 }
23 // CHECK: double @double_func()
double_func()24 double double_func() {
25   return 5.0;
26 }
27 }
28