]> granicus.if.org Git - clang/commitdiff
Integrate the following from the 'objective-rewrite' branch:
authorSteve Naroff <snaroff@apple.com>
Sun, 6 Dec 2009 01:48:44 +0000 (01:48 +0000)
committerSteve Naroff <snaroff@apple.com>
Sun, 6 Dec 2009 01:48:44 +0000 (01:48 +0000)
http://llvm.org/viewvc/llvm-project?view=rev&revision=82174

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90692 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/RewriteObjC.cpp

index 9fc0669ca34b4cd544e5205cccc7ef1167e9e927..a9bf3c04fc08178f8c3042cd154748f9f94a9aea 100644 (file)
@@ -2240,8 +2240,7 @@ Stmt *RewriteObjC::RewriteObjCStringLiteral(ObjCStringLiteral *Exp) {
                                 PrintingPolicy(LangOpts));
   Preamble += prettyBuf.str();
   Preamble += ",";
-  // The minus 2 removes the begin/end double quotes.
-  Preamble += utostr(prettyBuf.str().size()-2) + "};\n";
+  Preamble += utostr(Exp->getString()->getByteLength()) + "};\n";
 
   VarDecl *NewVD = VarDecl::Create(*Context, TUDecl, SourceLocation(),
                                     &Context->Idents.get(S.c_str()), strType, 0,