]> granicus.if.org Git - clang/commitdiff
Delete unused method and clangAST dependency it required.
authorDaniel Jasper <djasper@google.com>
Sun, 26 Oct 2014 14:26:55 +0000 (14:26 +0000)
committerDaniel Jasper <djasper@google.com>
Sun, 26 Oct 2014 14:26:55 +0000 (14:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220640 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Rewrite/Core/Rewriter.h
lib/Rewrite/CMakeLists.txt
lib/Rewrite/Rewriter.cpp

index d32cb284ba3e6d8f1b7e9a5895338c6e5ffbcd8a..1ab7be6c53170f8897e3f7cca565144b41104515 100644 (file)
@@ -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
index 0c77536012aad0dff84901562193e81a69d7bd4b..16550b1b710ef9f0dc4d863ddca69eabdb1425da 100644 (file)
@@ -10,7 +10,6 @@ add_clang_library(clangRewrite
   TokenRewriter.cpp
 
   LINK_LIBS
-  clangAST
   clangBasic
   clangLex
   )
index c8f4c80b1e6b8943de1f5c997f5ed47ff12480eb..6eee1631fe7a154524309f1065e003dfc157846d 100644 (file)
@@ -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 range, SourceRange replacementRange) {
   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;