diff options
author | Johnny Chen <johnny.chen@apple.com> | 2011-08-26 23:51:22 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2011-08-26 23:51:22 +0000 |
commit | 24281181bd847f79b6224572b6e9053d39b72dd3 (patch) | |
tree | a0bfeeedb611a2bb7d05cbfa3f119d317e9e4242 /lldb/source/Core/DataExtractor.cpp | |
parent | 4cd2a8e2f4e55b969bd657a97743ea599086fefd (diff) | |
download | bcm5719-llvm-24281181bd847f79b6224572b6e9053d39b72dd3.tar.gz bcm5719-llvm-24281181bd847f79b6224572b6e9053d39b72dd3.zip |
Micro-optimization: Update the shift amount only when needed.
llvm-svn: 138678
Diffstat (limited to 'lldb/source/Core/DataExtractor.cpp')
-rw-r--r-- | lldb/source/Core/DataExtractor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Core/DataExtractor.cpp b/lldb/source/Core/DataExtractor.cpp index 4eb4d26ef7d..d869aaef669 100644 --- a/lldb/source/Core/DataExtractor.cpp +++ b/lldb/source/Core/DataExtractor.cpp @@ -1232,9 +1232,9 @@ DataExtractor::GetULEB128 (uint32_t *offset_ptr) const bytecount++; byte = *src++; result |= (byte & 0x7f) << shift; - shift += 7; if ((byte & 0x80) == 0) break; + shift += 7; } *offset_ptr += bytecount; |