[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 17 02:01:47 PDT 2024


================
@@ -1764,6 +1764,13 @@ class TargetInfo : public TransferrableTargetInfo,
     return 0;
   }
 
+  /// \returns Target specific flat ptr address space; a flat ptr is a ptr that
+  /// can be casted to / from all other target address spaces. If the target
+  /// exposes no such address space / does not care, we return 0.
----------------
arsenm wrote:

This further spreads the notion that 0 is a lack of address space, which it is not. You shouldn't need a new thing for this; it should be equivalent to querying the target address space map for the LangAS Generic thing 

https://github.com/llvm/llvm-project/pull/95728


More information about the cfe-commits mailing list