From afb4fc189c3f5c552dfd4dc5eed93072143daadd Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 16 Sep 2002 22:30:20 +0000 Subject: [PATCH] Fix FunctionInlining pass assertion failure: ilist:104: failed assertion `Traits::getNext(NodePtr) != 0 && "Dereferencing end()!"' llvm-svn: 3768 --- llvm/lib/Transforms/IPO/InlineSimple.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/IPO/InlineSimple.cpp b/llvm/lib/Transforms/IPO/InlineSimple.cpp index 54092ae91b4a..d88a923e2257 100644 --- a/llvm/lib/Transforms/IPO/InlineSimple.cpp +++ b/llvm/lib/Transforms/IPO/InlineSimple.cpp @@ -163,7 +163,7 @@ bool InlineFunction(CallInst *CI) { } // Add a branch to the code that was after the original Call. - new BranchInst(NewBB, IBB->end()); + IBB->getInstList().push_back(new BranchInst(NewBB)); break; } case Instruction::Br: -- GitLab