brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 1e8075d Raw
71 lines · plain
1## Tests the case where we fail to load a submodule of a submodule. We force this2## by removing the submodule 'module qux' of 'module baz' from the modulemap.3#4# REQUIRES: system-darwin5#6# RUN: split-file %s %t/sources7# RUN: %clang_host -g %t/sources/main.m -fmodules -fcxx-modules \8# RUN:             -fmodule-map-file=%t/sources/module.modulemap \9# RUN:             -fmodules-cache-path=%t/ModuleCache -o %t.out10# RUN: sed -i '' -e 's/module qux/module quz/' %t/sources/module.modulemap11#12# RUN: %lldb -x -o "settings set interpreter.stop-command-source-on-error false" \13# RUN:       -s %t/sources/commands.input %t.out -o exit 2>&1 | FileCheck %s --check-prefix=NO_LOG14#15# RUN: %lldb -x -o "settings set interpreter.stop-command-source-on-error false" \16# RUN:       -s %t/sources/commands-with-log.input %t.out -o exit 2>&1 | FileCheck %s --check-prefix=LOG17 18#--- main.m19@import foo.baz.qux;20@import bar;21 22int main() { __builtin_debugtrap(); }23 24#--- foo.h25struct foo {};26 27#--- bar.h28struct bar {};29 30#--- baz.h31struct baz {};32 33#--- qux.h34struct qux {};35 36#--- module.modulemap37module foo {38    header "foo.h"39    export *40 41    module baz {42        header "baz.h"43        export *44 45        module qux {46            header "qux.h"47            export *48        }49    }50}51 52module bar {53    header "bar.h"54    export *55}56 57#--- commands.input58run59## Make sure expression fails so the 'note' diagnostics get printed.60expr blah61 62# NO_LOG-NOT: couldn't load submodule 'qux' of module 'foo.baz'63 64#--- commands-with-log.input65log enable lldb expr66run67## Make sure expression fails so the 'note' diagnostics get printed.68expr blah69 70# LOG: couldn't load submodule 'qux' of module 'foo.baz'71