[cfe-commits] r56560 - /cfe/trunk/Driver/RewriteBlocks.cpp

Steve Naroff snaroff at apple.com
Wed Sep 24 10:22:35 PDT 2008


Author: snaroff
Date: Wed Sep 24 12:22:34 2008
New Revision: 56560

URL: http://llvm.org/viewvc/llvm-project?rev=56560&view=rev
Log:
Fix some const-ness to keep the VisualStudio C++ compiler happy.

Modified:
    cfe/trunk/Driver/RewriteBlocks.cpp

Modified: cfe/trunk/Driver/RewriteBlocks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/RewriteBlocks.cpp?rev=56560&r1=56559&r2=56560&view=diff

==============================================================================
--- cfe/trunk/Driver/RewriteBlocks.cpp (original)
+++ cfe/trunk/Driver/RewriteBlocks.cpp Wed Sep 24 12:22:34 2008
@@ -133,7 +133,7 @@
   void RewriteMethodDecl(ObjCMethodDecl *MDecl);
   
   bool BlockPointerTypeTakesAnyBlockArguments(QualType QT);
-  void GetExtentOfArgList(const char *Name, char *&LParen, char *&RParen);
+  void GetExtentOfArgList(const char *Name, const char *&LParen, const char *&RParen);
 };
   
 }
@@ -826,8 +826,8 @@
 }
 
 void RewriteBlocks::GetExtentOfArgList(const char *Name, 
-                                       char *&LParen, char *&RParen) {
-  char *argPtr = strchr(Name, '(');
+                                       const char *&LParen, const char *&RParen) {
+  const char *argPtr = strchr(Name, '(');
   assert((*argPtr == '(') && "Rewriter fuzzy parser confused");
   
   LParen = argPtr; // output the start.
@@ -876,7 +876,7 @@
     // Replace the '^' with '*' for arguments.
     DeclLoc = ND->getLocation();
     startBuf = SM->getCharacterData(DeclLoc);
-    char *argListBegin, *argListEnd;
+    const char *argListBegin, *argListEnd;
     GetExtentOfArgList(startBuf, argListBegin, argListEnd);
     while (argListBegin < argListEnd) {
       if (*argListBegin == '^') {





More information about the cfe-commits mailing list