mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-28 11:56:08 +00:00

This adds a new module test infrastructure. This requires tagging tests using modules. The test runner uses this information to determine the compiler flags needed to build and use the module. Currently modules are build per test, which allows testing them for tests with ADDITIONAL_COMPILE_FLAGS. At the moment only 4 tests use modules. Therefore the performance penalty is not measurable. If in the future more tests use modules it would be good to measure the overhead and determine whether it's acceptable.
25 lines
678 B
C++
25 lines
678 B
C++
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
|
|
// UNSUPPORTED: clang-modules-build
|
|
// UNSUPPORTED: gcc
|
|
|
|
// XFAIL: has-no-cxx-module-support
|
|
|
|
// A minimal test to validate import works.
|
|
|
|
// MODULE_DEPENDENCIES: std
|
|
|
|
import std;
|
|
|
|
int main(int, char**) {
|
|
std::println("Hello modular world");
|
|
return 0;
|
|
}
|