43 lines · plain
1// This tests that after a fatal module loader error, we do not continue parsing.2 3// RUN: rm -rf %t4// RUN: split-file %s %t5// RUN: mkdir %t/ModulesCache6// RUN: touch %t/ModulesCache/Unusable.pcm7 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.o11// RUN: ls %t/ModulesCache | not grep AfterUnusable12 13//--- Frameworks/Unusable.framework/Headers/Unusable.h14// empty15//--- Frameworks/Unusable.framework/Modules/module.modulemap16framework module Unusable { header "Unusable.h" }17 18//--- Frameworks/AfterUnusable.framework/Headers/AfterUnusable.h19// empty20//--- Frameworks/AfterUnusable.framework/Modules/module.modulemap21framework module AfterUnusable { header "AfterUnusable.h" }22 23//--- Frameworks/Importer.framework/Headers/Importer.h24#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.h29// 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.modulemap35framework module Importer {36 umbrella header "Importer.h"37 module * { export * }38 export *39}40 41//--- test.m42#import <Importer/Importer.h>43