HomePhabricator

OpaquePtr: Support i32** with --force-opaque-pointers

Authored by dexonsmith on Jun 29 2021, 12:49 PM.

Description

OpaquePtr: Support i32** with --force-opaque-pointers

4506f614cb6983a16d117cf77a968608e66d7a5c fixed parsing of textual IR to
reject ptr*, but broke the auto-conversion of i32** to ptr with
--force-opaque-pointers.

Get that working again by refactoring LLParser::parseType to only send
ptr-spelled pointers into the type suffix logic when it's the return
of a function type. This also rejects ptr addrspace(3) addrspace(2),
which 1e6303e60ca5af4fbe7ca728572fd65666a98271 invadvertently started
accepting. Just the default top-level error message for the
double-addrspace since I had trouble thinking of something nice;
probably it's fine as is (it doesn't look valid the way that ptr*
does).

Differential Revision: https://reviews.llvm.org/D105146

Details

Committed
dexonsmithJun 29 2021, 2:10 PM
Differential Revision
D105146: OpaquePtr: Support i32** with --force-opaque-pointers
Parents
rG6d72845a8517: [llvm-objcopy][MachO] Code cleanup
Branches
Unknown
Tags
Unknown