r220640 - Delete unused method and clangAST dependency it required.

Daniel Jasper djasper at google.com
Sun Oct 26 07:26:56 PDT 2014


Author: djasper
Date: Sun Oct 26 09:26:55 2014
New Revision: 220640

URL: http://llvm.org/viewvc/llvm-project?rev=220640&view=rev
Log:
Delete unused method and clangAST dependency it required.

Modified:
    cfe/trunk/include/clang/Rewrite/Core/Rewriter.h
    cfe/trunk/lib/Rewrite/CMakeLists.txt
    cfe/trunk/lib/Rewrite/Rewriter.cpp

Modified: cfe/trunk/include/clang/Rewrite/Core/Rewriter.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Rewrite/Core/Rewriter.h?rev=220640&r1=220639&r2=220640&view=diff
==============================================================================
--- cfe/trunk/include/clang/Rewrite/Core/Rewriter.h (original)
+++ cfe/trunk/include/clang/Rewrite/Core/Rewriter.h Sun Oct 26 09:26:55 2014
@@ -27,7 +27,6 @@ namespace clang {
   class LangOptions;
   class Rewriter;
   class SourceManager;
-  class Stmt;
 
 /// RewriteBuffer - As code is rewritten, SourceBuffer's from the original
 /// input with modifications get a new RewriteBuffer associated with them.  The
@@ -255,10 +254,6 @@ public:
                                parentIndent);
   }
 
-  /// ConvertToString converts statement 'From' to a string using the
-  /// pretty printer.
-  std::string ConvertToString(Stmt *From);
-
   /// getEditBuffer - This is like getRewriteBufferFor, but always returns a
   /// buffer, and allows you to write on it directly.  This is useful if you
   /// want efficient low-level access to apis for scribbling on one specific

Modified: cfe/trunk/lib/Rewrite/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Rewrite/CMakeLists.txt?rev=220640&r1=220639&r2=220640&view=diff
==============================================================================
--- cfe/trunk/lib/Rewrite/CMakeLists.txt (original)
+++ cfe/trunk/lib/Rewrite/CMakeLists.txt Sun Oct 26 09:26:55 2014
@@ -10,7 +10,6 @@ add_clang_library(clangRewrite
   TokenRewriter.cpp
 
   LINK_LIBS
-  clangAST
   clangBasic
   clangLex
   )

Modified: cfe/trunk/lib/Rewrite/Rewriter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Rewrite/Rewriter.cpp?rev=220640&r1=220639&r2=220640&view=diff
==============================================================================
--- cfe/trunk/lib/Rewrite/Rewriter.cpp (original)
+++ cfe/trunk/lib/Rewrite/Rewriter.cpp Sun Oct 26 09:26:55 2014
@@ -15,7 +15,6 @@
 #include "clang/Rewrite/Core/Rewriter.h"
 #include "clang/AST/Decl.h"
 #include "clang/AST/PrettyPrinter.h"
-#include "clang/AST/Stmt.h"
 #include "clang/Basic/DiagnosticIDs.h"
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/SourceManager.h"
@@ -328,14 +327,6 @@ bool Rewriter::ReplaceText(SourceRange r
   return ReplaceText(start, origLength, MB.substr(newOffs, newLength));
 }
 
-std::string Rewriter::ConvertToString(Stmt *From) {
-  assert(From != nullptr && "Expected non-null Stmt");
-  std::string SStr;
-  llvm::raw_string_ostream S(SStr);
-  From->printPretty(S, nullptr, PrintingPolicy(*LangOpts));
-  return S.str();
-}
-
 bool Rewriter::IncreaseIndentation(CharSourceRange range,
                                    SourceLocation parentIndent) {
   if (range.isInvalid()) return true;





More information about the cfe-commits mailing list