1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/test/Bitcode/byval-upgrade.test
Tim Northover 42e839cbcd Reapply: IR: add optional type to 'byval' function parameters
When we switch to opaque pointer types we will need some way to describe
how many bytes a 'byval' parameter should occupy on the stack. This adds
a (for now) optional extra type parameter.

If present, the type must match the pointee type of the argument.

The original commit did not remap byval types when linking modules, which broke
LTO. This version fixes that.

Note to front-end maintainers: if this causes test failures, it's probably
because the "byval" attribute is printed after attributes without any parameter
after this change.

llvm-svn: 362128
2019-05-30 18:48:23 +00:00

8 lines
283 B
Plaintext

RUN: llvm-dis %p/Inputs/byval-upgrade.bc -o - | FileCheck %s
Make sure we upgrade old-stile IntAttribute byval records to a fully typed
version correctly.
CHECK: call void @bar({ i32*, i8 }* byval({ i32*, i8 }) %ptr)
CHECK: invoke void @bar({ i32*, i8 }* byval({ i32*, i8 }) %ptr)