mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-30 02:32:08 +00:00
4f859aa532
Make ParamAttrsList objects unique. You can no longer directly create or destroy them but instead must go through the ParamAttrsList::get() interface. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36327 91177308-0d34-0410-b5e6-96231b3b80d8
26 lines
622 B
LLVM
26 lines
622 B
LLVM
; For PR1187
|
|
; RUN: llvm-upgrade < %s > /dev/null
|
|
; XFAIL: *
|
|
; Un-XFAIL this when PR1146 is fixed.
|
|
|
|
%mystruct = type { int, double }
|
|
%glob = global %mystruct { int 3, double 42.0 }
|
|
%fptr = external global void (i32)*
|
|
|
|
implementation
|
|
|
|
csretcc void %nada(%mystruct * %ptr, int %val) {
|
|
ret void
|
|
}
|
|
|
|
int %main(int %argc, ubyte** %argv) {
|
|
%astr = alloca %mystruct
|
|
call void %nada(%mystruct* %astr, i32 7)
|
|
%fptr = alloca void (%mystruct*, i32)*
|
|
%f = load void (%mystruct*, i32)**%fptr
|
|
call csretcc void %f(%mystruct* %astr, i32 7)
|
|
store void (%mystruct* , i32)* %nada, void (%mystruct*, i32)** %fptr
|
|
|
|
ret int 0
|
|
}
|