1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/test/Verifier/byval-1.ll
Matt Arsenault ec50a05ed6 Verifier: Fix assert when verifying non-pointer byval or preallocated
This would fail on a cast<PointerType> when verifying the attribute if
these attributes were incorrectly used with a non-pointer type.
2020-11-20 20:08:43 -05:00

6 lines
322 B
LLVM

; RUN: not llvm-as < %s -o /dev/null 2>&1 | FileCheck %s
; CHECK: Wrong types for attribute: inalloca nest noalias nocapture nonnull readnone readonly byref(i32) byval(i32) preallocated(i32) sret(i32) align 1 dereferenceable(1) dereferenceable_or_null(1)
; CHECK-NEXT: void (i32)* @h
declare void @h(i32 byval(i32) %num)