blob: b255b6300077605fe70f583d80315ffe0657729e [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
Douglas Gregor953a61f2013-02-07 19:01:24 +00003// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fdisable-module-hash -fmodules -fno-modules-global-index -F %S/Inputs %s -verify
Douglas Gregor1a49d972013-01-25 01:03:03 +00004// RUN: ls %t|not grep modules.idx
5// Run and create the global module index
Douglas Gregor953a61f2013-02-07 19:01:24 +00006// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fdisable-module-hash -fmodules -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
Douglas Gregor953a61f2013-02-07 19:01:24 +00009// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fdisable-module-hash -fmodules -F %S/Inputs %s -verify -print-stats 2>&1 | FileCheck %s
Douglas Gregora6b00fc2013-01-23 22:38:11 +000010
11// expected-no-diagnostics
12@import DependsOnModule;
Douglas Gregorf575d6e2013-01-25 00:45:27 +000013@import Module;
Douglas Gregora6b00fc2013-01-23 22:38:11 +000014
Douglas Gregor1a49d972013-01-25 01:03:03 +000015// CHECK: *** Global Module Index Statistics:
16
Douglas Gregorf575d6e2013-01-25 00:45:27 +000017int *get_sub() {
18 return Module_Sub;
19}