================
@@ -419,9 +420,24 @@ Error DataLayout::parsePointerSpec(StringRef Spec) {
// Address space. Optional, defaults to 0.
unsigned AddrSpace = 0;
- if (!Components[0].empty())
- if (Error Err = parseAddrSpace(Components[0], AddrSpace))
+ bool UnstableRepr = false;
+ bool NonIntegralRepr = false;
+ StringRef AddrSpaceStr = Components[0].drop_while([&](char C) {
+ if (C == 'n') {
+ NonIntegralRepr = true;
+ return true;
+ } else if (C == 'u') {
+ UnstableRepr = true;
+ return true;
+ }
+ return false;
+ });
+ if (!AddrSpaceStr.empty()) {
+ if (Error Err = parseAddrSpace(AddrSpaceStr, AddrSpace))
return Err;
+ }
+ if (AddrSpace == 0 && (NonIntegralRepr || UnstableRepr))
+ return createStringError("address space 0 cannot be non-integral");
----------------
jrtc27 wrote:
The check is for non-integral or unstable, but this only mentions the former
https://github.com/llvm/llvm-project/pull/105735
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits