[PATCH] D105146: OpaquePtr: Support i32** with --force-opaque-pointers

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 29 13:00:56 PDT 2021


dexonsmith added inline comments.


================
Comment at: llvm/lib/AsmParser/LLParser.cpp:2615-2632
     // Type ::= Type 'addrspace' '(' uint32 ')' '*'
     case lltok::kw_addrspace: {
       if (Result->isLabelTy())
         return tokError("basic block pointers are invalid");
       if (Result->isVoidTy())
         return tokError("pointers to void are invalid; use i8* instead");
       if (!PointerType::isValidElementType(Result))
----------------
Actually, maybe this is all wrong. `ptr addrspace(1) addrspace(2)` isn't valid. This would have been rejected originally, but was loosened at the same time that `ptr *` slipped through.

I'll undo the addrspace logic shuffle, and update this patch to fix that bug too.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105146/new/

https://reviews.llvm.org/D105146



More information about the llvm-commits mailing list