1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00
llvm-mirror/test/Assembler/invalid-opaque-ptr-double-addrspace.ll
Duncan P. N. Exon Smith b2d9b100f4 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
2021-06-29 14:10:29 -07:00

5 lines
148 B
LLVM

; RUN: not llvm-as < %s -disable-output 2>&1 | FileCheck %s
; CHECK: expected top-level entity
@g1 = external global ptr addrspace(3) addrspace(4)