Преглед на файлове

Delete unused method and clangAST dependency it required.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220640 91177308-0d34-0410-b5e6-96231b3b80d8
Daniel Jasper преди 10 години
родител
ревизия
f3a911f8cd
променени са 3 файла, в които са добавени 0 реда и са изтрити 15 реда
  1. 0 5
      include/clang/Rewrite/Core/Rewriter.h
  2. 0 1
      lib/Rewrite/CMakeLists.txt
  3. 0 9
      lib/Rewrite/Rewriter.cpp

+ 0 - 5
include/clang/Rewrite/Core/Rewriter.h

@@ -27,7 +27,6 @@ namespace clang {
   class LangOptions;
   class LangOptions;
   class Rewriter;
   class Rewriter;
   class SourceManager;
   class SourceManager;
-  class Stmt;
 
 
 /// RewriteBuffer - As code is rewritten, SourceBuffer's from the original
 /// RewriteBuffer - As code is rewritten, SourceBuffer's from the original
 /// input with modifications get a new RewriteBuffer associated with them.  The
 /// input with modifications get a new RewriteBuffer associated with them.  The
@@ -255,10 +254,6 @@ public:
                                parentIndent);
                                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
   /// getEditBuffer - This is like getRewriteBufferFor, but always returns a
   /// buffer, and allows you to write on it directly.  This is useful if you
   /// 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
   /// want efficient low-level access to apis for scribbling on one specific

+ 0 - 1
lib/Rewrite/CMakeLists.txt

@@ -10,7 +10,6 @@ add_clang_library(clangRewrite
   TokenRewriter.cpp
   TokenRewriter.cpp
 
 
   LINK_LIBS
   LINK_LIBS
-  clangAST
   clangBasic
   clangBasic
   clangLex
   clangLex
   )
   )

+ 0 - 9
lib/Rewrite/Rewriter.cpp

@@ -15,7 +15,6 @@
 #include "clang/Rewrite/Core/Rewriter.h"
 #include "clang/Rewrite/Core/Rewriter.h"
 #include "clang/AST/Decl.h"
 #include "clang/AST/Decl.h"
 #include "clang/AST/PrettyPrinter.h"
 #include "clang/AST/PrettyPrinter.h"
-#include "clang/AST/Stmt.h"
 #include "clang/Basic/DiagnosticIDs.h"
 #include "clang/Basic/DiagnosticIDs.h"
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/SourceManager.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));
   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,
 bool Rewriter::IncreaseIndentation(CharSourceRange range,
                                    SourceLocation parentIndent) {
                                    SourceLocation parentIndent) {
   if (range.isInvalid()) return true;
   if (range.isInvalid()) return true;