Files
TheRock/compiler/amd-llvm/lldb/test/Shell/Expr/TestClangModulesDeclLookup.test
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

63 lines
1.5 KiB
Plaintext

# XFAIL: target-windows
# XFAIL: system-linux
# XFAIL: system-windows && remote-linux
# Test that we can successfully locate decls in Clang modules for C++.
# RUN: split-file %s %t
# RUN: %clang_host -g -gdwarf %t/main.cpp -fmodules -fcxx-modules -o %t.out
# RUN: %lldb -o "settings set interpreter.stop-command-source-on-error false" \
# RUN: -x -b -s %t/commands.input %t.out 2>&1 \
# RUN: | FileCheck %s
#--- main.cpp
#include "Module.h"
int main() {
foo(10);
return 0;
}
#--- module.modulemap
module Module {
header "Module.h"
export *
}
#--- Module.h
// We use nodebug here ensures that LLDB tries to pick the decl out of the module.
// If debug-info is available, it would use that to construct the decl instead.
[[gnu::nodebug]] int foo(int x) { return x; }
int bar(int x, int y) { return x + y; }
#--- commands.input
breakpoint set -n foo
run
expression foo(5)
# FIXME: when we're stopped in a frame without debug-info, the ClangModulesDeclVendor
# is initialized properly and none of the modules in the CU are compiled (and lookup
# in the DeclVendor is not enabled).
# CHECK: expression foo(5)
# CHECK: error: 'foo' has unknown return type; cast the call to its declared return type
breakpoint set -p return -X main
continue
expression foo(50)
# However, once we're back in a frame with debug-info, the ClangModulesDeclVendor infrastructure
# is back on track.
# CHECK: expression foo(50)
# CHECK-NEXT: (int) $0 = 5
target modules dump ast --filter foo
# CHECK: (lldb) target modules dump ast --filter foo
# CHECK-NOT: foo