brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · bcb8a7d Raw
59 lines · plain
1## Tests the case where the module LLDB is trying to load isn't2## present in the modulemap. We force this by replacing 'module foo'3## in the modulemap.4#5# REQUIRES: system-darwin6#7# RUN: split-file %s %t/sources8# RUN: %clang_host -g %t/sources/main.m -fmodules -fcxx-modules \9# RUN:             -fmodule-map-file=%t/sources/module.modulemap \10# RUN:             -fmodules-cache-path=%t/ModuleCache -o %t.out11# RUN: sed -i '' -e 's/module foo/module baz/' %t/sources/module.modulemap12# RUN: sed -i '' -e 's/module bar/module qux/' %t/sources/module.modulemap13#14# RUN: %lldb -x -o "settings set interpreter.stop-command-source-on-error false" \15# RUN:       -s %t/sources/commands.input %t.out -o exit 2>&1 | FileCheck %s --check-prefix=NO_LOG16#17# RUN: %lldb -x -o "settings set interpreter.stop-command-source-on-error false" \18# RUN:       -s %t/sources/commands-with-log.input %t.out -o exit 2>&1 | FileCheck %s --check-prefix=LOG19 20#--- main.m21@import foo;22@import bar;23 24int main() { __builtin_debugtrap(); }25 26#--- foo.h27struct foo {};28 29#--- bar.h30struct bar {};31 32#--- module.modulemap33module foo {34    header "foo.h"35    export *36}37 38module bar {39    header "bar.h"40    export *41}42 43#--- commands.input44run45## Make sure expression fails so the 'note' diagnostics get printed.46expr blah47 48# NO_LOG-NOT: header search couldn't locate module 'foo'49# NO_LOG-NOT: header search couldn't locate module 'bar'50 51#--- commands-with-log.input52log enable lldb expr53run54## Make sure expression fails so the 'note' diagnostics get printed.55expr blah56 57# LOG: header search couldn't locate module 'foo'58# LOG: header search couldn't locate module 'bar'59