[cfe-commits] r129732 - /cfe/trunk/tools/c-index-test/c-index-test.c

Francois Pichet pichet2000 at gmail.com
Mon Apr 18 16:33:22 PDT 2011


Author: fpichet
Date: Mon Apr 18 18:33:22 2011
New Revision: 129732

URL: http://llvm.org/viewvc/llvm-project?rev=129732&view=rev
Log:
Unbreak the MSVC build: Don't mix variable declarations and statements in a .c file.

Modified:
    cfe/trunk/tools/c-index-test/c-index-test.c

Modified: cfe/trunk/tools/c-index-test/c-index-test.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/c-index-test/c-index-test.c?rev=129732&r1=129731&r2=129732&view=diff
==============================================================================
--- cfe/trunk/tools/c-index-test/c-index-test.c (original)
+++ cfe/trunk/tools/c-index-test/c-index-test.c Mon Apr 18 18:33:22 2011
@@ -372,9 +372,11 @@
 
 void PrintMemoryUsage(CXTranslationUnit TU) {
   CXTUMemoryUsage usage = clang_getCXTUMemoryUsage(TU);
-  fprintf(stderr, "Memory usage:\n");
   unsigned long total = 0.0;
-  for (unsigned i = 0, n = usage.numEntries; i != n; ++i) {
+  unsigned i, n;
+
+  fprintf(stderr, "Memory usage:\n");
+  for (i = 0, n = usage.numEntries; i != n; ++i) {
     const char *name = clang_getTUMemoryUsageName(usage.entries[i].kind);
     unsigned long amount = usage.entries[i].amount;
     total += amount;





More information about the cfe-commits mailing list