[cfe-commits] r72611 - in /cfe/trunk/lib/Frontend: RewriteBlocks.cpp RewriteObjC.cpp

Eli Friedman eli.friedman at gmail.com
Fri May 29 22:19:26 PDT 2009


Author: efriedma
Date: Sat May 30 00:19:26 2009
New Revision: 72611

URL: http://llvm.org/viewvc/llvm-project?rev=72611&view=rev
Log:
Pass an ASTContext into Stmt::printPretty.


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

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

==============================================================================
--- cfe/trunk/lib/Frontend/RewriteBlocks.cpp (original)
+++ cfe/trunk/lib/Frontend/RewriteBlocks.cpp Sat May 30 00:19:26 2009
@@ -724,7 +724,7 @@
   BlockCall += "((struct __block_impl *)";
   std::string closureExprBufStr;
   llvm::raw_string_ostream closureExprBuf(closureExprBufStr);
-  Exp->getCallee()->printPretty(closureExprBuf);
+  Exp->getCallee()->printPretty(closureExprBuf, *Context);
   BlockCall += closureExprBuf.str();
   BlockCall += ")->FuncPtr)";
   
@@ -735,7 +735,7 @@
        E = Exp->arg_end(); I != E; ++I) {
     std::string syncExprBufS;
     llvm::raw_string_ostream Buf(syncExprBufS);
-    (*I)->printPretty(Buf);
+    (*I)->printPretty(Buf, *Context);
     BlockCall += ", " + Buf.str();
   }
   return BlockCall;

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

==============================================================================
--- cfe/trunk/lib/Frontend/RewriteObjC.cpp (original)
+++ cfe/trunk/lib/Frontend/RewriteObjC.cpp Sat May 30 00:19:26 2009
@@ -171,7 +171,7 @@
       // Get the new text.
       std::string SStr;
       llvm::raw_string_ostream S(SStr);
-      New->printPretty(S);
+      New->printPretty(S, *Context);
       const std::string &Str = S.str();
 
       // If replacement succeeded or warning disabled return with no warning.
@@ -1514,7 +1514,7 @@
                                                 SourceLocation());
   std::string syncExprBufS;
   llvm::raw_string_ostream syncExprBuf(syncExprBufS);
-  syncExpr->printPretty(syncExprBuf);
+  syncExpr->printPretty(syncExprBuf, *Context);
   buf += syncExprBuf.str();
   buf += ");\n";
   buf += "  if (_rethrow) objc_exception_throw(_rethrow);\n";
@@ -2143,7 +2143,7 @@
   // The pretty printer for StringLiteral handles escape characters properly.
   std::string prettyBufS;
   llvm::raw_string_ostream prettyBuf(prettyBufS);
-  Exp->getString()->printPretty(prettyBuf);
+  Exp->getString()->printPretty(prettyBuf, *Context);
   Preamble += prettyBuf.str();
   Preamble += ",";
   // The minus 2 removes the begin/end double quotes.
@@ -4526,7 +4526,7 @@
     // Get the new text.
     std::string SStr;
     llvm::raw_string_ostream Buf(SStr);
-    Replacement->printPretty(Buf);
+    Replacement->printPretty(Buf, *Context);
     const std::string &Str = Buf.str();
 
     printf("CAST = %s\n", &Str[0]);





More information about the cfe-commits mailing list