[ELF] Reorder SectionBase/InputSectionBase members
[llvm-project.git] / clang / test / Frontend / rewrite-includes-modules.c
blobe70fe0dbaf03e05b6c6a5a695dd16e69fb95e199
1 // RUN: rm -rf %t
2 // RUN: mkdir %t
3 // RUN: echo 'extern int dummy;' > %t/dummy.h
4 // RUN: echo 'module dummy { header "dummy.h" }' > %t/module.modulemap
5 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t %s -I%t -E -frewrite-includes -o - | FileCheck %s
6 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x objective-c %s -I%t -E -frewrite-includes -o - | FileCheck %s
7 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x c++ %s -I%t -E -frewrite-includes -o - | FileCheck %s
9 int bar();
10 #include "dummy.h"
11 int foo();
12 #include "dummy.h"
14 // CHECK: int bar();{{$}}
15 // CHECK-NEXT: #if 0 /* expanded by -frewrite-includes */{{$}}
16 // CHECK-NEXT: #include "dummy.h"{{$}}
17 // CHECK-NEXT: #endif /* expanded by -frewrite-includes */{{$}}
18 // CHECK-NEXT: # 10 "{{.*[/\\]}}rewrite-includes-modules.c"{{$}}
19 // CHECK-NEXT: #pragma clang module import dummy /* clang -frewrite-includes: implicit import */{{$}}
20 // CHECK-NEXT: # 11 "{{.*[/\\]}}rewrite-includes-modules.c"{{$}}
21 // CHECK-NEXT: int foo();{{$}}
22 // CHECK-NEXT: #if 0 /* expanded by -frewrite-includes */{{$}}
23 // CHECK-NEXT: #include "dummy.h"{{$}}
24 // CHECK-NEXT: #endif /* expanded by -frewrite-includes */{{$}}
25 // CHECK-NEXT: # 12 "{{.*[/\\]}}rewrite-includes-modules.c"{{$}}
26 // CHECK-NEXT: #pragma clang module import dummy /* clang -frewrite-includes: implicit import */{{$}}
27 // CHECK-NEXT: # 13 "{{.*[/\\]}}rewrite-includes-modules.c"{{$}}