diff --git a/llvm/lib/CodeGen/DwarfWriter.cpp b/llvm/lib/CodeGen/DwarfWriter.cpp index 784bf930b584..086786bcab3d 100644 --- a/llvm/lib/CodeGen/DwarfWriter.cpp +++ b/llvm/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/llvm/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp b/llvm/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp index 3b10a952d7f4..7f015369d56b 100644 --- a/llvm/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp +++ b/llvm/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;