summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARFContext.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-05-06 21:19:44 +0000
committerEric Christopher <echristo@gmail.com>2013-05-06 21:19:44 +0000
commit0cdce8351a28bdeef853a69c127803e74875c942 (patch)
tree177340f0b971444fd3d81dd90101d615dec2d649 /llvm/lib/DebugInfo/DWARFContext.cpp
parent34ea33680f9e91942ddfd2ab2cef262097b79ea2 (diff)
downloadbcm5719-llvm-0cdce8351a28bdeef853a69c127803e74875c942.tar.gz
bcm5719-llvm-0cdce8351a28bdeef853a69c127803e74875c942.zip
Hoist boundary condition out of loop header.
llvm-svn: 181248
Diffstat (limited to 'llvm/lib/DebugInfo/DWARFContext.cpp')
-rw-r--r--llvm/lib/DebugInfo/DWARFContext.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARFContext.cpp
index a47fe56fe42..9f521330c34 100644
--- a/llvm/lib/DebugInfo/DWARFContext.cpp
+++ b/llvm/lib/DebugInfo/DWARFContext.cpp
@@ -141,7 +141,8 @@ void DWARFContext::dump(raw_ostream &OS, DIDumpType DumpType) {
OS << "\n.debug_str_offsets.dwo contents:\n";
DataExtractor strOffsetExt(getStringOffsetDWOSection(), isLittleEndian(), 0);
offset = 0;
- while (offset < getStringOffsetDWOSection().size()) {
+ uint64_t size = getStringOffsetDWOSection().size();
+ while (offset < size) {
OS << format("0x%8.8x: ", offset);
OS << format("%8.8x\n", strOffsetExt.getU32(&offset));
}
OpenPOWER on IntegriCloud