aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2008-09-24 17:22:34 +0000
committerSteve Naroff <snaroff@apple.com>2008-09-24 17:22:34 +0000
commit1f6c3aebffc9ce318b672d0ca808e00031d3ba04 (patch)
treefbab35f2550d6772b010e77985f98720ca50a186
parent485eeff9ba73376c8e01179bf1a501b1723446cb (diff)
Fix some const-ness to keep the VisualStudio C++ compiler happy.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56560 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--Driver/RewriteBlocks.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Driver/RewriteBlocks.cpp b/Driver/RewriteBlocks.cpp
index b9e2217db2..691f104a64 100644
--- a/Driver/RewriteBlocks.cpp
+++ b/Driver/RewriteBlocks.cpp
@@ -133,7 +133,7 @@ public:
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 @@ bool RewriteBlocks::BlockPointerTypeTakesAnyBlockArguments(QualType QT) {
}
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 @@ void RewriteBlocks::RewriteBlockPointerDecl(NamedDecl *ND) {
// 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 == '^') {