[llvm-commits] [llvm] r129904 - /llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp

Nick Lewycky nicholas at mxc.ca
Wed Apr 20 19:48:39 PDT 2011


Author: nicholas
Date: Wed Apr 20 21:48:39 2011
New Revision: 129904

URL: http://llvm.org/viewvc/llvm-project?rev=129904&view=rev
Log:
Fix think-o: emit all 8 bytes of the EOF marker. Also reflow a line in a
comment for 80 columns.

Modified:
    llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp

Modified: llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp?rev=129904&r1=129903&r2=129904&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp Wed Apr 20 21:48:39 2011
@@ -123,8 +123,8 @@
     // represent this string in a GCOV file
     unsigned LengthOfGCOVString(StringRef s) {
       // A GCOV string is a length, followed by a NUL, then between 0 and 3 NULs
-      // padding out to the next 4-byte word. The length is measured in 4-byte words
-      // including padding, not bytes of actual string.
+      // padding out to the next 4-byte word. The length is measured in 4-byte
+      // words including padding, not bytes of actual string.
       return (s.size() + 5) / 4;
     }
 
@@ -367,7 +367,7 @@
   for (DenseMap<const MDNode *, raw_fd_ostream *>::iterator
            I = gcno_files.begin(), E = gcno_files.end(); I != E; ++I) {
     raw_fd_ostream *&Out = I->second;
-    Out->write("\0\0\0\0\0\0\0\0", 4); // EOF
+    Out->write("\0\0\0\0\0\0\0\0", 8); // EOF
     Out->close();
     delete Out;
   }





More information about the llvm-commits mailing list