mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
1b32fba3b3
The opaque pointer type is essentially just a normal pointer type with a null pointee type. This also adds support for the opaque pointer type to the bitcode reader/writer, as well as to textual IR. To avoid confusion with existing pointer types, we disallow creating a pointer to an opaque pointer. Opaque pointer types should not be widely used at this point since many parts of LLVM still do not support them. The next steps are to add some very simple use cases of opaque pointers to make sure they work, then start pretending that all pointers are opaque pointers and see what breaks. https://lists.llvm.org/pipermail/llvm-dev/2021-May/150359.html Reviewed By: dblaikie, dexonsmith, pcc Differential Revision: https://reviews.llvm.org/D101704
8 lines
174 B
LLVM
8 lines
174 B
LLVM
; RUN: not llvm-as < %s -disable-output 2>&1 | FileCheck %s
|
|
|
|
; CHECK: pointer to this type is invalid
|
|
define void @f(ptr %a) {
|
|
%b = bitcast ptr %a to ptr*
|
|
ret void
|
|
}
|