Use back() instead of [size()-1].
authorDan Gohman <gohman@apple.com>
Sat, 21 Jun 2008 22:00:54 +0000 (22:00 +0000)
committerDan Gohman <gohman@apple.com>
Sat, 21 Jun 2008 22:00:54 +0000 (22:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52600 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/DwarfWriter.cpp
lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp

index 784bf930b584db7690734a66ba13d83a43c8323b..086786bcab3dae8abfb31b8ccc8aee04fae04ca2 100644 (file)
@@ -3304,7 +3304,7 @@ private:
 
           // Try to merge with the previous call-site.
           if (PreviousIsInvoke) {
 
           // 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;
             if (Site.PadLabel == Prev.PadLabel && Site.Action == Prev.Action) {
               // Extend the range of the previous entry.
               Prev.EndLabel = Site.EndLabel;
index 3b10a952d7f4c6c8bf66c1aed38b78e475e8a91a..7f015369d56b460d2541b8fc8075baf2ae31d7bd 100644 (file)
@@ -364,7 +364,7 @@ unsigned char* JITDwarfEmitter::EmitExceptionTable(MachineFunction* MF,
 
       // Try to merge with the previous call-site.
       if (CallSites.size()) {
 
       // 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;
         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()) {
 
       // 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;
         if (Site.PadLabel == Prev.PadLabel && Site.Action == Prev.Action) {
           // Extend the range of the previous entry.
           Prev.EndLabel = Site.EndLabel;