Debian Codegraph @

clang/test/Modules/submodule-in-private-mmap-vfs.m

raw
1 // RUN: rm -rf %t
2 // RUN: split-file %s %t
3 // RUN: sed -e "s|DIR|%/t|g" %t/vfs.json.in > %t/vfs.json
4 // RUN: %clang_cc1 -fmodules -fno-modules-share-filemanager -fimplicit-module-maps \
5 // RUN: -fmodules-cache-path=%t -I%t/Virtual -ivfsoverlay %t/vfs.json -fsyntax-only %t/tu.m -verify
6
7 //--- Dir1/module.modulemap
8
9 //--- Dir2/module.private.modulemap
10 module Foo_Private {}
11
12 //--- vfs.json.in
13 {
14 'version': 0,
15 'use-external-names': true,
16 'roots': [
17 {
18 'name': 'DIR/Virtual',
19 'type': 'directory',
20 'contents': [
21 {
22 'name': 'module.modulemap',
23 'type': 'file',
24 'external-contents': 'DIR/Dir1/module.modulemap'
25 },
26 {
27 'name': 'module.private.modulemap',
28 'type': 'file',
29 'external-contents': 'DIR/Dir2/module.private.modulemap'
30 }
31 ]
32 }
33 ]
34 }
35
36 //--- tu.m
37 @import Foo_Private;
38 // expected-no-diagnostics