mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-13 17:37:00 +00:00

Close https://github.com/llvm/llvm-project/issues/62707 As we discussed before, we'll forbid the use of implicit generated path for C++20 modules. And as I mentioned in https://github.com/llvm/llvm-project/issues/62707, we've emitted a warning for clang17 and we'll make it a hard error in clang18. And the patch addresses the decision.
26 lines
775 B
C++
26 lines
775 B
C++
// RUN: rm -rf %t
|
|
// RUN: mkdir %t
|
|
// RUN: split-file %s %t
|
|
//
|
|
// RUN: %clang_cc1 -std=c++20 %t/a.cppm -emit-module-interface -o %t/a.pcm
|
|
// RUN: %clang_cc1 -std=c++20 %t/user.cpp -fmodule-file=%t/a.pcm -fsyntax-only \
|
|
// RUN: 2>&1 | FileCheck %t/user.cpp
|
|
// RUN: %clang_cc1 -std=c++20 %t/b.cppm -emit-module-interface -o %t/b.pcm \
|
|
// RUN: -fprebuilt-module-path=%t
|
|
// RUN: %clang_cc1 -std=c++20 %t/b.pcm -S \
|
|
// RUN: -fprebuilt-module-path=%t -emit-llvm 2>&1 -o - | FileCheck %t/b.cppm
|
|
|
|
//--- a.cppm
|
|
export module a;
|
|
|
|
//--- b.cppm
|
|
export module b;
|
|
import a;
|
|
|
|
// CHECK-NOT: warning
|
|
|
|
//--- user.cpp
|
|
import a;
|
|
|
|
// CHECK: the form '-fmodule-file=<BMI-path>' is deprecated for standard C++ named modules;consider to use '-fmodule-file=<module-name>=<BMI-path>' instead
|