xref: /minix3/external/bsd/llvm/dist/clang/test/Modules/global_index.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: rm -rf %t
2*f4a2713aSLionel Sambuc// Run without global module index
3*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fdisable-module-hash -fmodules -fno-modules-global-index -F %S/Inputs %s -verify
4*f4a2713aSLionel Sambuc// RUN: ls %t|not grep modules.idx
5*f4a2713aSLionel Sambuc// Run and create the global module index
6*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fdisable-module-hash -fmodules -F %S/Inputs %s -verify
7*f4a2713aSLionel Sambuc// RUN: ls %t|grep modules.idx
8*f4a2713aSLionel Sambuc// Run and use the global module index
9*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fdisable-module-hash -fmodules -F %S/Inputs %s -verify -print-stats 2>&1 | FileCheck %s
10*f4a2713aSLionel Sambuc
11*f4a2713aSLionel Sambuc// expected-no-diagnostics
12*f4a2713aSLionel Sambuc@import DependsOnModule;
13*f4a2713aSLionel Sambuc@import Module;
14*f4a2713aSLionel Sambuc
15*f4a2713aSLionel Sambuc// CHECK: *** Global Module Index Statistics:
16*f4a2713aSLionel Sambuc
17*f4a2713aSLionel Sambucint *get_sub() {
18*f4a2713aSLionel Sambuc  return Module_Sub;
19*f4a2713aSLionel Sambuc}
20