1 // RUN: rm -rf %t 2 // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -x objective-c %s -F %S/../Modules/Inputs -E -frewrite-includes -o - | FileCheck %s 3 4 int bar(); 5 #include <Module/Module.h> 6 int foo(); 7 #include <Module/Module.h> 8 9 // CHECK: int bar();{{$}} 10 // CHECK-NEXT: #if 0 /* expanded by -frewrite-includes */{{$}} 11 // CHECK-NEXT: #include <Module/Module.h>{{$}} 12 // CHECK-NEXT: #endif /* expanded by -frewrite-includes */{{$}} 13 // CHECK-NEXT: # 5 "{{.*[/\\]}}rewrite-includes-modules.c"{{$}} 14 // CHECK-NEXT: @import Module; /* clang -frewrite-includes: implicit import */{{$}} 15 // CHECK-NEXT: # 6 "{{.*[/\\]}}rewrite-includes-modules.c"{{$}} 16 // CHECK-NEXT: int foo();{{$}} 17 // CHECK-NEXT: #if 0 /* expanded by -frewrite-includes */{{$}} 18 // CHECK-NEXT: #include <Module/Module.h>{{$}} 19 // CHECK-NEXT: #endif /* expanded by -frewrite-includes */{{$}} 20 // CHECK-NEXT: # 7 "{{.*[/\\]}}rewrite-includes-modules.c"{{$}} 21 // CHECK-NEXT: @import Module; /* clang -frewrite-includes: implicit import */{{$}} 22 // CHECK-NEXT: # 8 "{{.*[/\\]}}rewrite-includes-modules.c"{{$}} 23