[llvm] r259313 - Shrink character buffer size in raw_ostream::write_hex to 16 characters intead of 20 as that's the largest string a 64-bit hex value can be.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 30 17:12:38 PST 2016


Author: ctopper
Date: Sat Jan 30 19:12:38 2016
New Revision: 259313

URL: http://llvm.org/viewvc/llvm-project?rev=259313&view=rev
Log:
Shrink character buffer size in raw_ostream::write_hex to 16 characters intead of 20 as that's the largest string a 64-bit hex value can be.

Modified:
    llvm/trunk/lib/Support/raw_ostream.cpp

Modified: llvm/trunk/lib/Support/raw_ostream.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/raw_ostream.cpp?rev=259313&r1=259312&r2=259313&view=diff
==============================================================================
--- llvm/trunk/lib/Support/raw_ostream.cpp (original)
+++ llvm/trunk/lib/Support/raw_ostream.cpp Sat Jan 30 19:12:38 2016
@@ -166,7 +166,7 @@ raw_ostream &raw_ostream::write_hex(unsi
   if (N == 0)
     return *this << '0';
 
-  char NumberBuffer[20];
+  char NumberBuffer[16];
   char *EndPtr = std::end(NumberBuffer);
   char *CurPtr = EndPtr;
 




More information about the llvm-commits mailing list