From: Dan Gohman Date: Sat, 21 Jun 2008 22:00:54 +0000 (+0000) Subject: Use back() instead of [size()-1]. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;ds=sidebyside;h=719de53742167ca3f0e6b2efafb6eac18bd90452;p=oota-llvm.git Use back() instead of [size()-1]. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52600 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/DwarfWriter.cpp b/lib/CodeGen/DwarfWriter.cpp index 784bf930b58..086786bcab3 100644 --- a/lib/CodeGen/DwarfWriter.cpp +++ b/lib/CodeGen/DwarfWriter.cpp @@ -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; diff --git a/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp b/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp index 3b10a952d7f..7f015369d56 100644 --- a/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp +++ b/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp @@ -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;