[clang] don't serialize MODULE_DIRECTORY with ModuleFileHomeIsCwd
authorRichard Howell <rhow@fb.com>
Tue, 4 Apr 2023 19:35:45 +0000 (12:35 -0700)
committerRichard Howell <rhow@fb.com>
Wed, 5 Apr 2023 14:19:48 +0000 (07:19 -0700)
commit8ee5029b225ba1ff415e0a0a6a68dc4e3efee4d1
tree3502abc7795647636f5c623f686510d2a575b634
parent17fc38889a0d71ff8591d6d0c7905ea911d830dd
[clang] don't serialize MODULE_DIRECTORY with ModuleFileHomeIsCwd

Fix a bug in the MODULE_DIRECTORY serialization logic
that would cause MODULE_DIRECTORY to be serialized when
`-fmodule-file-home-is-cwd` is specified.

This matches the original logic added in:
https://github.com/apple/llvm-project/commit/f7b41371d9ede1aecf0930e5bd4a463519264633

Reviewed By: keith

Differential Revision: https://reviews.llvm.org/D147561
clang/lib/Serialization/ASTWriter.cpp
clang/test/Modules/module-file-home-is-cwd.m