From c049c929333be7c0b48fe89bfc786e8950d496e9 Mon Sep 17 00:00:00 2001 From: Edwin Vane Date: Thu, 2 May 2013 19:02:02 +0000 Subject: Add support to read include/exclude paths from file Files containing the list of paths to be included and excluded can now be specified through -include-from= and -exclude-from= command line options in cpp11-migrate. Added support for data files for cpp11-migrate unittests. The Cpp11MigrateTests executable just requires a DATADIR environment variable to be set which specifies the directory where data files are stored. This is handled automatically when using LIT. Author: Jack Yang , Edwin Vane llvm-svn: 180939 --- clang-tools-extra/cpp11-migrate/tool/Cpp11Migrate.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'clang-tools-extra/cpp11-migrate/tool/Cpp11Migrate.cpp') diff --git a/clang-tools-extra/cpp11-migrate/tool/Cpp11Migrate.cpp b/clang-tools-extra/cpp11-migrate/tool/Cpp11Migrate.cpp index 5b0661a9380..d71626ce828 100644 --- a/clang-tools-extra/cpp11-migrate/tool/Cpp11Migrate.cpp +++ b/clang-tools-extra/cpp11-migrate/tool/Cpp11Migrate.cpp @@ -54,12 +54,20 @@ SummaryMode("summary", cl::desc("Print transform summary"), // options are implemented in the tool. static cl::opt IncludePaths("include", cl::Hidden, - cl::desc("Comma seperated list of filepaths to consider to be " + cl::desc("Comma seperated list of paths to consider to be " "transformed")); static cl::opt ExcludePaths("exclude", cl::Hidden, - cl::desc("Comma seperated list of filepaths that can not " + cl::desc("Comma seperated list of paths that can not " "be transformed")); +static cl::opt +IncludeFromFile("include-from", cl::Hidden, cl::value_desc("filename"), + cl::desc("File containing a list of paths to consider to " + "be transformed")); +static cl::opt +ExcludeFromFile("exclude-from", cl::Hidden, cl::value_desc("filename"), + cl::desc("File containing a list of paths that can not be " + "transforms")); class EndSyntaxArgumentsAdjuster : public ArgumentsAdjuster { CommandLineArguments Adjust(const CommandLineArguments &Args) { -- cgit v1.2.3