blob: 0c8fca0cfd63b8ff9baf252da04ce6dca213105d [file] [log] [blame]
Douglas Gregora6b00fc2013-01-23 22:38:11 +00001// RUN: rm -rf %t
Douglas Gregor1a49d972013-01-25 01:03:03 +00002// Run without global module index
3// RUN: %clang_cc1 -Wauto-import -fmodule-cache-path %t -fdisable-module-hash -fmodules -F %S/Inputs %s -verify
4// RUN: ls %t|not grep modules.idx
5// Run and create the global module index
Douglas Gregorf575d6e2013-01-25 00:45:27 +00006// RUN: %clang_cc1 -Wauto-import -fmodule-cache-path %t -fdisable-module-hash -fmodules -fmodules-global-index -F %S/Inputs %s -verify
Douglas Gregora6b00fc2013-01-23 22:38:11 +00007// RUN: ls %t|grep modules.idx
Douglas Gregor1a49d972013-01-25 01:03:03 +00008// Run and use the global module index
9// RUN: %clang_cc1 -Wauto-import -fmodule-cache-path %t -fdisable-module-hash -fmodules -fmodules-global-index -F %S/Inputs %s -verify -print-stats 2>&1 | FileCheck %s
Douglas Gregorf575d6e2013-01-25 00:45:27 +000010// REQUIRES: shell
Douglas Gregora6b00fc2013-01-23 22:38:11 +000011
12// expected-no-diagnostics
13@import DependsOnModule;
Douglas Gregorf575d6e2013-01-25 00:45:27 +000014@import Module;
Douglas Gregora6b00fc2013-01-23 22:38:11 +000015
Douglas Gregor1a49d972013-01-25 01:03:03 +000016// CHECK: *** Global Module Index Statistics:
17
Douglas Gregorf575d6e2013-01-25 00:45:27 +000018int *get_sub() {
19 return Module_Sub;
20}