Remove unneeded and invalid SetInsertPoint calls from unittest.
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 26 Sep 2012 15:16:05 +0000 (15:16 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 26 Sep 2012 15:16:05 +0000 (15:16 +0000)
BB->end() returns a sentinel value that is not a legal insert point.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164699 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/Transforms/Utils/IntegerDivision.cpp

index e5b84b893d39b3f6c6a2d37ba7c8303f7b5cdd38..a3211391d6898b87cc6b0098ab102517cbce05de 100644 (file)
@@ -47,8 +47,6 @@ TEST(IntegerDivision, SDiv) {
 
   Instruction* Quotient = dyn_cast<Instruction>(cast<User>(Ret)->getOperand(0));
   EXPECT_TRUE(Quotient && Quotient->getOpcode() == Instruction::Sub);
-
-  Builder.SetInsertPoint(BB->end());
 }
 
 TEST(IntegerDivision, UDiv) {
@@ -79,8 +77,6 @@ TEST(IntegerDivision, UDiv) {
 
   Instruction* Quotient = dyn_cast<Instruction>(cast<User>(Ret)->getOperand(0));
   EXPECT_TRUE(Quotient && Quotient->getOpcode() == Instruction::PHI);
-
-  Builder.SetInsertPoint(BB->end());
 }
 
 TEST(IntegerDivision, SRem) {
@@ -111,8 +107,6 @@ TEST(IntegerDivision, SRem) {
 
   Instruction* Remainder = dyn_cast<Instruction>(cast<User>(Ret)->getOperand(0));
   EXPECT_TRUE(Remainder && Remainder->getOpcode() == Instruction::Sub);
-
-  Builder.SetInsertPoint(BB->end());
 }
 
 TEST(IntegerDivision, URem) {
@@ -143,8 +137,6 @@ TEST(IntegerDivision, URem) {
 
   Instruction* Remainder = dyn_cast<Instruction>(cast<User>(Ret)->getOperand(0));
   EXPECT_TRUE(Remainder && Remainder->getOpcode() == Instruction::Sub);
-
-  Builder.SetInsertPoint(BB->end());
 }
 
 }