blob: e94c69ac3c1cb59a31de725d0e0a2c8443942d00 [file] [log] [blame]
Douglas Gregor5e306b12013-01-23 22:38:11 +00001// RUN: rm -rf %t
Douglas Gregore060e572013-01-25 01:03:03 +00002// Run without global module index
Bruno Cardoso Lopes297299192017-12-22 02:53:30 +00003// RUN: %clang_cc1 -Wauto-import -Wno-private-module -fmodules-cache-path=%t -fdisable-module-hash -fmodules -fimplicit-module-maps -fno-modules-global-index -F %S/Inputs %s -verify
Douglas Gregore060e572013-01-25 01:03:03 +00004// RUN: ls %t|not grep modules.idx
5// Run and create the global module index
Bruno Cardoso Lopes297299192017-12-22 02:53:30 +00006// RUN: %clang_cc1 -Wauto-import -Wno-private-module -fmodules-cache-path=%t -fdisable-module-hash -fmodules -fimplicit-module-maps -F %S/Inputs %s -verify
Douglas Gregor5e306b12013-01-23 22:38:11 +00007// RUN: ls %t|grep modules.idx
Douglas Gregore060e572013-01-25 01:03:03 +00008// Run and use the global module index
Bruno Cardoso Lopes297299192017-12-22 02:53:30 +00009// RUN: %clang_cc1 -Wauto-import -Wno-private-module -fmodules-cache-path=%t -fdisable-module-hash -fmodules -fimplicit-module-maps -F %S/Inputs %s -verify -print-stats 2>&1 | FileCheck %s
Douglas Gregor5e306b12013-01-23 22:38:11 +000010
11// expected-no-diagnostics
12@import DependsOnModule;
Douglas Gregorc1bbec82013-01-25 00:45:27 +000013@import Module;
Douglas Gregor5e306b12013-01-23 22:38:11 +000014
Douglas Gregore060e572013-01-25 01:03:03 +000015// CHECK: *** Global Module Index Statistics:
16
Douglas Gregorc1bbec82013-01-25 00:45:27 +000017int *get_sub() {
18 return Module_Sub;
19}