Use back() instead of [size()-1].

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52600 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2008-06-21 22:00:54 +00:00
parent befc9c16fa
commit 719de53742
2 changed files with 3 additions and 3 deletions

View File

@ -3304,7 +3304,7 @@ private:
// Try to merge with the previous call-site.
if (PreviousIsInvoke) {
CallSiteEntry &Prev = CallSites[CallSites.size()-1];
CallSiteEntry &Prev = CallSites.back();
if (Site.PadLabel == Prev.PadLabel && Site.Action == Prev.Action) {
// Extend the range of the previous entry.
Prev.EndLabel = Site.EndLabel;

View File

@ -364,7 +364,7 @@ unsigned char* JITDwarfEmitter::EmitExceptionTable(MachineFunction* MF,
// Try to merge with the previous call-site.
if (CallSites.size()) {
CallSiteEntry &Prev = CallSites[CallSites.size()-1];
CallSiteEntry &Prev = CallSites.back();
if (Site.PadLabel == Prev.PadLabel && Site.Action == Prev.Action) {
// Extend the range of the previous entry.
Prev.EndLabel = Site.EndLabel;
@ -979,7 +979,7 @@ JITDwarfEmitter::GetExceptionTableSizeInBytes(MachineFunction* MF) const {
// Try to merge with the previous call-site.
if (CallSites.size()) {
CallSiteEntry &Prev = CallSites[CallSites.size()-1];
CallSiteEntry &Prev = CallSites.back();
if (Site.PadLabel == Prev.PadLabel && Site.Action == Prev.Action) {
// Extend the range of the previous entry.
Prev.EndLabel = Site.EndLabel;