diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index c0675b43d52..5488131289f 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -396,7 +396,8 @@ void Verifier::visitBasicBlock(BasicBlock &BB) { // Check constraints that this basic block imposes on all of the PHI nodes in // it. if (isa(BB.front())) { - std::vector Preds(pred_begin(&BB), pred_end(&BB)); + SmallVector Preds(pred_begin(&BB), pred_end(&BB)); + SmallVector, 8> Values; std::sort(Preds.begin(), Preds.end()); PHINode *PN; for (BasicBlock::iterator I = BB.begin(); (PN = dyn_cast(I));++I) { @@ -410,7 +411,7 @@ void Verifier::visitBasicBlock(BasicBlock &BB) { "parent basic block!", PN); // Get and sort all incoming values in the PHI node... - std::vector > Values; + Values.clear(); Values.reserve(PN->getNumIncomingValues()); for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) Values.push_back(std::make_pair(PN->getIncomingBlock(i),