[llvm] [WIP] Extend data layout to add non zero null value for address space. (PR #83109)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 5 06:01:33 PST 2024


================
@@ -251,6 +253,15 @@ template <typename IntTy> static Error getInt(StringRef R, IntTy &Result) {
   return Error::success();
 }
 
+template <typename IntTy>
+static Error getIntForAddrSpace(StringRef R, IntTy &Result) {
+  if (R.equals("neg"))
+    Result = -1;
+  else
+    return getInt<IntTy>(R, Result);
+  return Error::success();
----------------
arsenm wrote:

This syntax doesn't really make sense. If we want special named values, "neg" doesn't really say "neg1"

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


More information about the llvm-commits mailing list