================ @@ -245,6 +246,7 @@ class DataLayout { unsigned getDefaultGlobalsAddressSpace() const { return DefaultGlobalsAddrSpace; } + unsigned getFlatAddressSpace() const { return FlatAddressSpace; } ---------------- AlexVlx wrote:
I think that for general ergonomics making this an `optional` is preferable to magic constant + comment. That'd unambiguously convey absence, and it's what optional is for. Whilst incredibly unlikely, it is currently not impossible for some future target do decide that AS UINT32_MAX carries semantic meaning, and run into trouble around this. https://github.com/llvm/llvm-project/pull/108786 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits