]> granicus.if.org Git - clang/commitdiff
Pass an ASTContext into Stmt::printPretty.
authorEli Friedman <eli.friedman@gmail.com>
Sat, 30 May 2009 05:19:26 +0000 (05:19 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Sat, 30 May 2009 05:19:26 +0000 (05:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72611 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/RewriteBlocks.cpp
lib/Frontend/RewriteObjC.cpp

index 6d0f10def2076b80f6206eaa8776cce288647928..9d73d90554cee22396436b4e4e29eb6b43848abd 100644 (file)
@@ -724,7 +724,7 @@ std::string RewriteBlocks::SynthesizeBlockCall(CallExpr *Exp) {
   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 @@ std::string RewriteBlocks::SynthesizeBlockCall(CallExpr *Exp) {
        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;
index 55f0b405a9300d9c32e00f95e3153178e72414f9..f382704014f7eeecc4f59883624d834a2b997489 100644 (file)
@@ -171,7 +171,7 @@ namespace {
       // 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 @@ Stmt *RewriteObjC::RewriteObjCSynchronizedStmt(ObjCAtSynchronizedStmt *S) {
                                                 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 @@ Stmt *RewriteObjC::RewriteObjCStringLiteral(ObjCStringLiteral *Exp) {
   // 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 @@ Stmt *RewriteObjC::RewriteFunctionBodyOrGlobalInitializer(Stmt *S) {
     // 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]);