mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-21 11:10:12 +00:00
3602011bec
the function type, instead they belong to functions and function calls. This is an updated and slightly corrected version of Reid Spencer's original patch. The only known problem is that auto-upgrading of bitcode files doesn't seem to work properly (see test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully a bitcode guru (who might that be? :) ) will fix it. llvm-svn: 44359
24 lines
569 B
LLVM
24 lines
569 B
LLVM
; RUN: llvm-upgrade < %s > /dev/null
|
|
; PR1187
|
|
|
|
%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
|
|
}
|