[all-commits] [llvm/llvm-project] a3efd8: [clang][modules] Don't prevent translation of FW_P...

Jan Svoboda via All-commits all-commits at lists.llvm.org
Wed Nov 1 12:01:07 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a3efd892fa57b72c2a0875a2fc9033b57f90d696
      https://github.com/llvm/llvm-project/commit/a3efd892fa57b72c2a0875a2fc9033b57f90d696
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2023-11-01 (Wed, 01 Nov 2023)

  Changed paths:
    M clang/lib/Basic/Module.cpp
    A clang/test/ClangScanDeps/modules-priv-fw-from-pub.m

  Log Message:
  -----------
  [clang][modules] Don't prevent translation of FW_Private includes when explicitly building FW (#70714)

We prevent translating `#include <FW/PrivateHeader.h>` into an import of
FW_Private when compiling the implementation of FW or FW_Private. This
is specified via `-fmodule-name=` on the TU command line (used to be
`-fmodule-implementation-of`).

This logic is supposed to only kick in when imported directly from a TU,
but it currently also kicks in when compiling the public FW module
explicitly (since it also has `-fmodule-name=` on the command line).

This patch makes sure this logic only kicks in for the case that used to
be `-fmodule-implementation-of` (for the TU), and not for all
`-fmodule-name=` cases (especially for the explicit compile of a
module).

rdar://101051277; related: rdar://37500098&38434694




More information about the All-commits mailing list