[clang] [clang-tools-extra] [Clang] Use TargetInfo when deciding if an address space is compatible (PR #115777)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 15 19:10:58 PST 2024
================
@@ -111,6 +111,18 @@ class LLVM_LIBRARY_VISIBILITY AMDGPUTargetInfo final : public TargetInfo {
return getPointerWidthV(AddrSpace);
}
+ virtual bool isAddressSpaceSupersetOf(LangAS A, LangAS B) const override {
+ // The flat address space AS(0) is a superset of all the other address
+ // spaces used by the backend target.
----------------
jhuber6 wrote:
The logic should only permit 0-5, I was torn on rejecting AS(2).
https://github.com/llvm/llvm-project/pull/115777
More information about the cfe-commits
mailing list