Files
TheRock/compiler/amd-llvm/clang/test/Modules/cxx20-module-file-info.cpp
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

66 lines
1.7 KiB
C++

// Test output from -module-file-info about C++20 modules.
// RUN: rm -rf %t
// RUN: mkdir -p %t
// RUN: split-file %s %t
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/mod-info-tu1.cpp \
// RUN: -o %t/A.pcm
// RUN: %clang_cc1 -std=c++20 -module-file-info %t/A.pcm | FileCheck \
// RUN: --check-prefix=CHECK-A %s
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/mod-info-tu2.cpp \
// RUN: -o %t/B.pcm
// RUN: %clang_cc1 -std=c++20 -module-file-info %t/B.pcm | FileCheck \
// RUN: --check-prefix=CHECK-B %s
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/mod-info-tu3.cpp \
// RUN: -fmodule-file=A=%t/A.pcm -fmodule-file=B=%t/B.pcm -o %t/Foo.pcm
// RUN: %clang_cc1 -std=c++20 -module-file-info %t/Foo.pcm -fmodule-file=A=%t/A.pcm \
// RUN: -fmodule-file=B=%t/B.pcm | FileCheck \
// RUN: --check-prefix=CHECK-FOO %s
// expected-no-diagnostics
//--- mod-info-tu1.cpp
export module A;
void a();
// CHECK-A: ====== C++20
// CHECK-A-NEXT: Interface Unit 'A' is the Primary Module at index #1
//--- mod-info-tu2.cpp
export module B;
void b();
// CHECK-B: ====== C++20
// CHECK-B-NEXT: Interface Unit 'B' is the Primary Module at index #1
//--- mod-info-tu3.cpp
module;
export module Foo;
import A;
export import B;
namespace hello {
export void say(const char *);
}
void foo() {}
// CHECK-FOO: ====== C++20
// CHECK-FOO-NEXT: Interface Unit 'Foo' is the Primary Module at index #3
// CHECK-FOO-NEXT: Sub Modules:
// CHECK-FOO-NEXT: Global Module Fragment '<global>' is at index #4
// CHECK-FOO-NEXT: Imports:
// CHECK-FOO-NEXT: Interface Unit 'A' is at index #1
// CHECK-FOO-NEXT: Exports:
// CHECK-FOO-NEXT: Interface Unit 'B' is at index #2