brintos

brintos / llvm-project-archived public Read only

0
0
Text · 522 B · 5fab9f3 Raw
25 lines · plain
1// Checks that Clang modules can be imported from within the global module 2// fragment of a named module interface unit.3// Fixes #159768.4 5// RUN: rm -rf %t6// RUN: mkdir -p %t7// RUN: split-file %s %t8 9// RUN: %clang -std=c++23 -fmodules -fmodule-map-file=%t/module.modulemap \10// RUN:   -fmodules-cache-path=%t --precompile %t/A.cppm -o %t/A.pcm11 12//--- module.modulemap13module foo { header "foo.h" }14 15//--- foo.h16// empty17 18//--- A.cppm19module;20#include "foo.h"21export module A;22 23export auto A() -> int { return 42; }24 25