Use back() instead of [size()-1].
[oota-llvm.git] / lib / ExecutionEngine / JIT / JITDwarfEmitter.cpp
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()) {
-        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;