[llvm-commits] [llvm] r52030 - in /llvm/trunk: lib/VMCore/Verifier.cpp test/Assembler/AggregrateReturn.ll
Dan Gohman
gohman at apple.com
Thu Jun 5 16:57:06 PDT 2008
Author: djg
Date: Thu Jun 5 18:57:06 2008
New Revision: 52030
URL: http://llvm.org/viewvc/llvm-project?rev=52030&view=rev
Log:
Revert 52002.
Removed:
llvm/trunk/test/Assembler/AggregrateReturn.ll
Modified:
llvm/trunk/lib/VMCore/Verifier.cpp
Modified: llvm/trunk/lib/VMCore/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=52030&r1=52029&r2=52030&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Verifier.cpp (original)
+++ llvm/trunk/lib/VMCore/Verifier.cpp Thu Jun 5 18:57:06 2008
@@ -594,10 +594,7 @@
Assert2(N == 0,
"Found return instr that returns void in Function of non-void "
"return type!", &RI, F->getReturnType());
- else if (N > 1) {
- 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());
+ else if (const StructType *STy = dyn_cast<StructType>(F->getReturnType())) {
Assert2(STy->getNumElements() == N,
"Incorrect number of return values in ret instruction!",
&RI, F->getReturnType());
Removed: llvm/trunk/test/Assembler/AggregrateReturn.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/AggregrateReturn.ll?rev=52029&view=auto
==============================================================================
--- llvm/trunk/test/Assembler/AggregrateReturn.ll (original)
+++ llvm/trunk/test/Assembler/AggregrateReturn.ll (removed)
@@ -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
-}
More information about the llvm-commits
mailing list