diff options
Diffstat (limited to 'test/Modules/global_index.m')
-rw-r--r-- | test/Modules/global_index.m | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Modules/global_index.m b/test/Modules/global_index.m new file mode 100644 index 0000000..b255b63 --- /dev/null +++ b/test/Modules/global_index.m @@ -0,0 +1,19 @@ +// RUN: rm -rf %t +// Run without global module index +// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fdisable-module-hash -fmodules -fno-modules-global-index -F %S/Inputs %s -verify +// RUN: ls %t|not grep modules.idx +// Run and create the global module index +// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fdisable-module-hash -fmodules -F %S/Inputs %s -verify +// RUN: ls %t|grep modules.idx +// Run and use the global module index +// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fdisable-module-hash -fmodules -F %S/Inputs %s -verify -print-stats 2>&1 | FileCheck %s + +// expected-no-diagnostics +@import DependsOnModule; +@import Module; + +// CHECK: *** Global Module Index Statistics: + +int *get_sub() { + return Module_Sub; +} |