Check in testcase and fix
authorChris Lattner <sabre@nondot.org>
Fri, 25 Jan 2002 03:44:58 +0000 (03:44 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 25 Jan 2002 03:44:58 +0000 (03:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1581 91177308-0d34-0410-b5e6-96231b3b80d8

test/Assembler/2002-01-24-ValueRefineAbsType.ll [new file with mode: 0644]

diff --git a/test/Assembler/2002-01-24-ValueRefineAbsType.ll b/test/Assembler/2002-01-24-ValueRefineAbsType.ll
new file mode 100644 (file)
index 0000000..c833c00
--- /dev/null
@@ -0,0 +1,24 @@
+; This testcase used to fail due to a lack of this diff in Value.cpp:
+; diff -r1.16 Value.cpp
+; 11c11
+; < #include "llvm/Type.h"
+; ---
+; > #include "llvm/DerivedTypes.h"
+; 74c74,76
+; <   assert(Ty.get() == (const Type*)OldTy &&"Can't refine anything but my type!");
+; ---
+; >   assert(Ty.get() == OldTy &&"Can't refine anything but my type!");
+; >   if (OldTy == NewTy && !OldTy->isAbstract())
+; >     Ty.removeUserFromConcrete();
+;
+; This was causing an assertion failure, due to the "foo" Method object never releasing
+; it's reference to the opaque %bb value.
+;
+declare void "foo"(%bb)
+
+%exception_descriptor = type opaque  
+
+%bb = type int
+
+implementation
+