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
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"{{$}}