[PATCH] D121096: [C++20][Modules][HU 2/5] Support searching Header Units in user or system search paths.

Iain Sandoe via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 7 04:39:22 PST 2022


iains created this revision.
Herald added a project: All.
iains added reviewers: rsmith, urnathan, ChuanqiXu.
iains published this revision for review.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This is support for the user-facing options to create importable header units
from headers in the user or system search paths (or to be given an absolute path).

This means that an incomplete header path will be passed by the driver and the
lookup carried out using the search paths present when the front end is run.

To support this, we introduce file fypes for c++-{user,system,header-unit}-header.
These terms are the same as the ones used by GCC, to minimise the differences for
tooling (and users).

The preprocessor checks for headers before issuing a warning for
"#pragma once" in a header build.  We ensure that the importable header units
are recognised as headers in order to avoid such warnings.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D121096

Files:
  clang/include/clang/Frontend/FrontendOptions.h
  clang/lib/Frontend/CompilerInvocation.cpp
  clang/lib/Frontend/FrontendAction.cpp
  clang/test/Modules/cxx20-hu-02.cpp
  clang/test/Modules/cxx20-hu-03.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121096.413396.patch
Type: text/x-patch
Size: 14092 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220307/5097ce10/attachment.bin>


More information about the cfe-commits mailing list