]> granicus.if.org Git - clang/commit
Allow RefactoringTool to write to memory instead of always to disk
authorEdwin Vane <edwin.vane@intel.com>
Fri, 11 Jan 2013 17:04:55 +0000 (17:04 +0000)
committerEdwin Vane <edwin.vane@intel.com>
Fri, 11 Jan 2013 17:04:55 +0000 (17:04 +0000)
commitd088a5f966c31462280d5ace29febc6889834611
tree275911f1c5bbf71b4dfbc799327223408a1f4535
parent088dab50b76d235cd5b0e701048efccfcea3677e
Allow RefactoringTool to write to memory instead of always to disk

RefactoringTool::run() always writes the result of rewrites to disk.
Instead, make this optional and provide a method for getting the
refactoring results in a memory buffer instead.

Also made ClangTool polymorphic so RefactoringTool could inherit from it
to properly express the IS-A relationship. This change also provides
access to ClangTool's public interface, e.g. mapVirtualFile() which is
important once refactored buffers start living in memory instead of on
disk.

Reviewers: klimek

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172219 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Rewrite/Core/Rewriter.h
include/clang/Tooling/Refactoring.h
include/clang/Tooling/Tooling.h
lib/Tooling/Refactoring.cpp