Debian Codegraph @

clang/test/ClangScanDeps/fatal-module-loader-error.m

raw
1 // This tests that after a fatal module loader error, we do not continue parsing.
2
3 // RUN: rm -rf %t
4 // RUN: split-file %s %t
5 // RUN: mkdir %t/ModulesCache
6 // RUN: touch %t/ModulesCache/Unusable.pcm
7
8 // RUN: not clang-scan-deps -format experimental-full -mode preprocess-dependency-directives -- \
9 // RUN: %clang -fmodules -fimplicit-modules -Xclang -fdisable-module-hash -fmodules-cache-path=%t/ModulesCache \
10 // RUN: -F %t/Frameworks -c %t/test.m -o %t/test.o
11 // RUN: ls %t/ModulesCache | not grep AfterUnusable
12
13 //--- Frameworks/Unusable.framework/Headers/Unusable.h
14 // empty
15 //--- Frameworks/Unusable.framework/Modules/module.modulemap
16 framework module Unusable { header "Unusable.h" }
17
18 //--- Frameworks/AfterUnusable.framework/Headers/AfterUnusable.h
19 // empty
20 //--- Frameworks/AfterUnusable.framework/Modules/module.modulemap
21 framework module AfterUnusable { header "AfterUnusable.h" }
22
23 //--- Frameworks/Importer.framework/Headers/Importer.h
24 #import <Importer/ImportUnusable.h>
25 // Parsing should have stopped and we should not handle AfterUnusable.
26 #import <AfterUnusable/AfterUnusable.h>
27
28 //--- Frameworks/Importer.framework/Headers/ImportUnusable.h
29 // It is important that this header is a submodule.
30 #import <Unusable/Unusable.h>
31 // Parsing should have stopped and we should not handle AfterUnusable.
32 #import <AfterUnusable/AfterUnusable.h>
33
34 //--- Frameworks/Importer.framework/Modules/module.modulemap
35 framework module Importer {
36 umbrella header "Importer.h"
37 module * { export * }
38 export *
39 }
40
41 //--- test.m
42 #import <Importer/Importer.h>