================
@@ -524,6 +524,16 @@ class CIRGenModule : public CIRGenTypeCache {
   /// space, which may lead to type mismatches in other parts of the IR.
   LangAS getLangTempAllocaAddressSpace() const;
 
+  /// Return the AST address space of the underlying global variable for D, as
+  /// determined by its declaration. Normally this is the same as the address
+  /// space of D's type, but in CUDA, address spaces are associated with
+  /// declarations, not types. If D is nullptr, return the default address
+  /// space for global variable.
+  ///
+  /// For languages without explicit address spaces, if D has default address
+  /// space, target-specific global or constant address space may be returned.
+  LangAS getGlobalVarAddressSpace(const VarDecl *decl);
----------------
steffenlarsen wrote:

Is this move to make it a public member? Would it be cleaner to add `nullptr` 
as the default parameter of this function, since `nullptr` becomes a relatively 
normal argument value for it?

https://github.com/llvm/llvm-project/pull/240548
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to