[llvm-commits] [llvm] r153549 - /llvm/trunk/runtime/libprofile/GCDAProfiling.c

Francois Pichet pichet2000 at gmail.com
Tue Mar 27 16:52:22 PDT 2012


Author: fpichet
Date: Tue Mar 27 18:52:22 2012
New Revision: 153549

URL: http://llvm.org/viewvc/llvm-project?rev=153549&view=rev
Log:
MSVC doesn't like the mixing of declarations and statements in a .c file.

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

Modified: llvm/trunk/runtime/libprofile/GCDAProfiling.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/runtime/libprofile/GCDAProfiling.c?rev=153549&r1=153548&r2=153549&view=diff
==============================================================================
--- llvm/trunk/runtime/libprofile/GCDAProfiling.c (original)
+++ llvm/trunk/runtime/libprofile/GCDAProfiling.c Tue Mar 27 18:52:22 2012
@@ -114,8 +114,9 @@
   output_file = fopen(filename, "wb");
 
   if (!output_file) {
+    const char *cptr = 0;
     filename[0] = '\0';  /* The size of filename should be big enough. */
-    char *cptr = strrchr(orig_filename, '/');
+    cptr = strrchr(orig_filename, '/');
     strcat(filename, cptr ? cptr + 1 : orig_filename);
     output_file = fopen(filename, "wb");
 





More information about the llvm-commits mailing list