diff options
author | Naveen Seth Hanig <naveen.hanig@outlook.com> | 2025-07-07 11:55:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-07 11:55:34 +0200 |
commit | ded142671663c404f4d9fb9ef4867b4fc680409a (patch) | |
tree | 54f83a0c2f2a8953f491f2100e2b57c837331702 /llvm/lib/Bitcode | |
parent | de7ff1f2248e76c7320b541eb5c082090c47390d (diff) | |
download | llvm-ded142671663c404f4d9fb9ef4867b4fc680409a.zip llvm-ded142671663c404f4d9fb9ef4867b4fc680409a.tar.gz llvm-ded142671663c404f4d9fb9ef4867b4fc680409a.tar.bz2 |
[clang][modules-driver] Add scanner to detect C++20 module presence (#145220)
This PR is part of a series to natively support C++20 module usage from
the Clang driver (without requiring an external build system).
This introduces a new scanner that detects C++20 module usage in source
files without using the preprocessor or lexer.
For now, it is enabled only with the `-fmodules-driver` flag and serves
solely diagnostic purposes. In the future, the scanner will be enabled
for any (modules-driver compatible) compilation with two or more inputs,
and will help the driver determine whether to implicitly enable the
modules driver.
Since the scanner adds very little overhead, we are also exploring
enabling it for compilations with only a single input. This approach
could allow us to detect `import std` usage in a single-file
compilation, which would then activate the modules driver.
For performance measurements on this, see
https://github.com/naveen-seth/llvm-dev-cxx-modules-check-benchmark.
RFC:
https://discourse.llvm.org/t/rfc-modules-support-simple-c-20-modules-use-from-the-clang-driver-without-a-build-system
Diffstat (limited to 'llvm/lib/Bitcode')
0 files changed, 0 insertions, 0 deletions