[ASTContext] Avoid duplicating address space map. NFCI
authorAlex Richardson <alexrichardson@google.com>
Fri, 16 Dec 2022 11:10:11 +0000 (11:10 +0000)
committerAlex Richardson <alexrichardson@google.com>
Fri, 16 Dec 2022 11:28:19 +0000 (11:28 +0000)
commitc4c23527d6c919bfd781fae0f7a82b9271b6429e
tree45e10c9216de247bb9f27d552ffb8a8d68e14a7c
parent231992d9b88fe4e0b4aa0f55ed64d7ba88b231ce
[ASTContext] Avoid duplicating address space map. NFCI

ASTContext was holding onto a pointer to the Clang->LLVM address space map
which is stored inside TargetInfo. Instead of doing this, we can forward to
TargetInfo instead. This change will allow us to eventually remove
getTargetAddressSpace() from ASTContext and only have this information in
TargetInfo.

Reviewed By: rjmccall

Differential Revision: https://reviews.llvm.org/D138316
clang/include/clang/AST/ASTContext.h
clang/lib/AST/ASTContext.cpp
clang/lib/Basic/TargetInfo.cpp