[llvm-commits] [llvm] r129384 - /llvm/trunk/runtime/libprofile/LineProfiling.c

Nick Lewycky nicholas at mxc.ca
Tue Apr 12 13:06:50 PDT 2011


Author: nicholas
Date: Tue Apr 12 15:06:50 2011
New Revision: 129384

URL: http://llvm.org/viewvc/llvm-project?rev=129384&view=rev
Log:
Print our uint64_t with the more portable (C99 and C++0x) %PRIu64 format
specifier.

Modified:
    llvm/trunk/runtime/libprofile/LineProfiling.c

Modified: llvm/trunk/runtime/libprofile/LineProfiling.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/runtime/libprofile/LineProfiling.c?rev=129384&r1=129383&r2=129384&view=diff
==============================================================================
--- llvm/trunk/runtime/libprofile/LineProfiling.c (original)
+++ llvm/trunk/runtime/libprofile/LineProfiling.c Tue Apr 12 15:06:50 2011
@@ -17,6 +17,8 @@
 #include <stdio.h>
 #include <stdint.h>
 
+#include "llvm/Support/DataTypes.h"
+
 /* A file in this case is a translation unit. Each .o file built with line
  * profiling enabled will emit to a different file. Only one file may be
  * started at a time.
@@ -29,7 +31,7 @@
 void llvm_prof_linectr_emit_counter(const char *dir, const char *file,
                                     uint32_t line, uint32_t column,
                                     uint64_t *counter) {
-  printf("%s/%s:%u:%u %lu\n", dir, file, line, column, *counter);
+  printf("%s/%s:%u:%u %" PRIu64 "\n", dir, file, line, column, *counter);
 }
 
 void llvm_prof_linectr_end_file() {





More information about the llvm-commits mailing list