26 lines · plain
1// Tests that we will pick the last `-fmodule-file=<module-name>=<path>` flag2// for <module-name>.3 4// RUN: rm -rf %t5// RUN: split-file %s %t6// RUN: cd %t7//8// RUN: %clang_cc1 -std=c++20 %t/a.cppm -emit-module-interface -o %t/a.pcm9// RUN: %clang_cc1 -std=c++20 %t/u.cpp -fmodule-file=a=%t/unexist.pcm \10// RUN: -fmodule-file=a=%t/a.pcm -verify -fsyntax-only11//12// RUN: %clang_cc1 -std=c++20 %t/a.cppm -emit-reduced-module-interface -o %t/a.pcm13// RUN: %clang_cc1 -std=c++20 %t/u.cpp -fmodule-file=a=%t/unexist.pcm \14// RUN: -fmodule-file=a=%t/a.pcm -verify -fsyntax-only15 16//--- a.cppm17export module a;18export int a();19 20//--- u.cpp21// expected-no-diagnostics22import a;23int u() {24 return a();25}26