diff options
author | Dan Gohman <gohman@apple.com> | 2008-08-22 16:07:55 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-08-22 16:07:55 +0000 |
commit | 1501cdbf63cff3afd92df6cd249096770334b268 (patch) | |
tree | 4bd8c7134277e2a860214aa80bb833260a8337b7 /lib/CodeGen/BranchFolding.cpp | |
parent | 969a46a948414734f5bc01994e54d88d153cb3fb (diff) |
Fix SmallVector's size calculation so that a size of 0 is
handled correctly, and change a few SmallVector uses to use
size 0 to more clearly reflect their intent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55181 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/BranchFolding.cpp')
-rw-r--r-- | lib/CodeGen/BranchFolding.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/BranchFolding.cpp b/lib/CodeGen/BranchFolding.cpp index c97f176d74..2ccfd191a0 100644 --- a/lib/CodeGen/BranchFolding.cpp +++ b/lib/CodeGen/BranchFolding.cpp @@ -364,7 +364,7 @@ void BranchFolder::ReplaceTailWithBranchTo(MachineBasicBlock::iterator OldInst, // If OldBB isn't immediately before OldBB, insert a branch to it. if (++MachineFunction::iterator(OldBB) != MachineFunction::iterator(NewDest)) - TII->InsertBranch(*OldBB, NewDest, 0, SmallVector<MachineOperand, 1>()); + TII->InsertBranch(*OldBB, NewDest, 0, SmallVector<MachineOperand, 0>()); OldBB->addSuccessor(NewDest); ++NumTailMerge; } @@ -444,7 +444,7 @@ static void FixTail(MachineBasicBlock* CurMBB, MachineBasicBlock *SuccBB, } } } - TII->InsertBranch(*CurMBB, SuccBB, NULL, SmallVector<MachineOperand, 1>()); + TII->InsertBranch(*CurMBB, SuccBB, NULL, SmallVector<MachineOperand, 0>()); } static bool MergeCompare(const std::pair<unsigned,MachineBasicBlock*> &p, |