[C++20] [Modules] Use '-' as the separator of partitions when searching
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>
Thu, 31 Mar 2022 03:21:37 +0000 (11:21 +0800)
committerChuanqi Xu <yedeng.yd@linux.alibaba.com>
Thu, 31 Mar 2022 03:21:58 +0000 (11:21 +0800)
commitee572129ae15bc15e34fcae63643d6998352dab3
treecb45de70b3ea491689d93561794f134be733f0cb
parent368681f803830f42c539fe37e753d8401a121454
[C++20] [Modules] Use '-' as the separator of partitions when searching
in filesystems

It is simpler to search for module unit by -fprebuilt-module-path
option. However, the separator ':' of partitions is not friendly.
According to the discussion in https://reviews.llvm.org/D118586, I think
we get consensus to use '-' as the separator instead. The '-' is the
choice of GCC too.

Previously I thought it would be better to add an option. But I feel it
is over-engineering now. Another reason here is that there are too many
options for modules (for clang module mainly) now. Given it is not bad
to use '-' when searching, I think it is acceptable to not add an
option.

Reviewed By: iains

Differential Revision: https://reviews.llvm.org/D120874
clang/lib/Lex/HeaderSearch.cpp
clang/test/Modules/search-partitions.cpp [new file with mode: 0644]