[Lldb-commits] [lldb] r138678 - /lldb/trunk/source/Core/DataExtractor.cpp

Johnny Chen johnny.chen at apple.com
Fri Aug 26 16:51:22 PDT 2011


Author: johnny
Date: Fri Aug 26 18:51:22 2011
New Revision: 138678

URL: http://llvm.org/viewvc/llvm-project?rev=138678&view=rev
Log:
Micro-optimization: Update the shift amount only when needed.

Modified:
    lldb/trunk/source/Core/DataExtractor.cpp

Modified: lldb/trunk/source/Core/DataExtractor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DataExtractor.cpp?rev=138678&r1=138677&r2=138678&view=diff
==============================================================================
--- lldb/trunk/source/Core/DataExtractor.cpp (original)
+++ lldb/trunk/source/Core/DataExtractor.cpp Fri Aug 26 18:51:22 2011
@@ -1232,9 +1232,9 @@
             bytecount++;
             byte = *src++;
             result |= (byte & 0x7f) << shift;
-            shift += 7;
             if ((byte & 0x80) == 0)
                 break;
+            shift += 7;
         }
 
         *offset_ptr += bytecount;





More information about the lldb-commits mailing list