mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
Revert 52002.
llvm-svn: 52030
This commit is contained in:
parent
67a5a4eba8
commit
70fe9e347d
@ -594,10 +594,7 @@ void Verifier::visitReturnInst(ReturnInst &RI) {
|
|||||||
Assert2(N == 0,
|
Assert2(N == 0,
|
||||||
"Found return instr that returns void in Function of non-void "
|
"Found return instr that returns void in Function of non-void "
|
||||||
"return type!", &RI, F->getReturnType());
|
"return type!", &RI, F->getReturnType());
|
||||||
else if (N > 1) {
|
else if (const StructType *STy = dyn_cast<StructType>(F->getReturnType())) {
|
||||||
const StructType *STy = dyn_cast<StructType>(F->getReturnType());
|
|
||||||
Assert2(STy, "Return instr with multiple values, but return type is not "
|
|
||||||
"a struct", &RI, F->getReturnType());
|
|
||||||
Assert2(STy->getNumElements() == N,
|
Assert2(STy->getNumElements() == N,
|
||||||
"Incorrect number of return values in ret instruction!",
|
"Incorrect number of return values in ret instruction!",
|
||||||
&RI, F->getReturnType());
|
&RI, F->getReturnType());
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
; RUN: llvm-as < %s | llvm-dis
|
|
||||||
|
|
||||||
define { i32, i32 } @foo() {
|
|
||||||
%res = insertvalue { i32, i32 } undef, i32 0, 0
|
|
||||||
%res2 = insertvalue { i32, i32 } %res, i32 1, 1
|
|
||||||
ret { i32, i32 } %res2
|
|
||||||
}
|
|
||||||
|
|
||||||
define [ 2 x i32 ] @bar() {
|
|
||||||
%res = insertvalue [ 2 x i32 ] undef, i32 0, 0
|
|
||||||
%res2 = insertvalue [ 2 x i32 ] %res, i32 1, 1
|
|
||||||
ret [ 2 x i32 ] %res2
|
|
||||||
}
|
|
||||||
|
|
||||||
define i32 @main() {
|
|
||||||
%a = call { i32, i32 }()* @foo ()
|
|
||||||
%b = call [ 2 x i32 ]()* @bar ()
|
|
||||||
%a.0 = extractvalue { i32, i32 } %a, 0
|
|
||||||
%b.1 = extractvalue [ 2 x i32 ] %b, 1
|
|
||||||
%r = add i32 %a.0, %b.1
|
|
||||||
ret i32 %r
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user