[PATCH] Initial attempt to restructure libTooling and move parts out that don't need to depend on lib/AST.

Daniel Jasper djasper at google.com
Tue Oct 28 01:09:15 PDT 2014


================
Comment at: lib/Tooling/Core/Replacement.cpp:257-262
@@ +256,8 @@
+
+std::string applyAllReplacements(StringRef Code, const Replacements &Replaces) {
+  FileManager Files((FileSystemOptions()));
+  DiagnosticsEngine Diagnostics(
+      IntrusiveRefCntPtr<DiagnosticIDs>(new DiagnosticIDs),
+      new DiagnosticOptions);
+  SourceManager SourceMgr(Diagnostics, Files);
+  Rewriter Rewrite(SourceMgr, LangOptions());
----------------
klimek wrote:
> Am I missing something or did you also cut the dependency on TextDiagnosticPrinter?
Yeah, sorry for not calling this out. TextDiagnosticPrinter isn't really used/necessary here and is part of clangFrontend which in turn also depends on clangAST.

http://reviews.llvm.org/D5973






More information about the cfe-commits mailing list