[cfe-commits] r90692 - /cfe/trunk/lib/Frontend/RewriteObjC.cpp

Steve Naroff snaroff at apple.com
Sat Dec 5 17:48:44 PST 2009


Author: snaroff
Date: Sat Dec  5 19:48:44 2009
New Revision: 90692

URL: http://llvm.org/viewvc/llvm-project?rev=90692&view=rev
Log:
Integrate the following from the 'objective-rewrite' branch:

http://llvm.org/viewvc/llvm-project?view=rev&revision=82174


Modified:
    cfe/trunk/lib/Frontend/RewriteObjC.cpp

Modified: cfe/trunk/lib/Frontend/RewriteObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/RewriteObjC.cpp?rev=90692&r1=90691&r2=90692&view=diff

==============================================================================
--- cfe/trunk/lib/Frontend/RewriteObjC.cpp (original)
+++ cfe/trunk/lib/Frontend/RewriteObjC.cpp Sat Dec  5 19:48:44 2009
@@ -2240,8 +2240,7 @@
                                 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,





More information about the cfe-commits mailing list