Add support for report execution times

-Added command line option -report-times to enable or disable the output. The
same option can be used to specify the output directory.
-Write timing data to a unique file in disk using json format.


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183142 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: turn off PID-based perf data filenames

Getting PIDs on Windows is broken. Proper fix is simple but requires testing so
just disabling PID-based file names for now.



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183154 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: collect performance timers per source file

Performance timers captured in each transform for all files they process are now collected and arranged per source file in preparation for writing to disk.

This revision is the last piece of the initial implementation of performance timer capturing.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183274 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: Eliminate windows line endings

r183274 accidentally added windows line endings to changed lines. Changing them
back.



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183322 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: Docs refresh

* Documented new command-line options.
* Moved usage to a new page.
  * Usage now split into general options and transform-related options.
* Main Migrator page now contains getting started and getting involved
  information.
  * Also included a JIRA issue collector button for logging bugs.



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183417 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: Refactor how global options are passed to Transforms

Refactored how global options are passed to Transforms to avoid widespread
changes every time a new global option is added.

Tests updated to reflect new interface.



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183443 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: Add EnableHeaderModification flag

First step toward supporting header modifications: adding a flag that turns on
such modifications. Eventually header modifications will be on by default but
until all the kinks can be worked out, they must be explicitly enabled.



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183444 91177308-0d34-0410-b5e6-96231b3b80d8
Fix build after clang change r183781.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183784 91177308-0d34-0410-b5e6-96231b3b80d8
More build fixes.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183785 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: New mechanism for overriding file contents

Next step toward supporting migrating headers. Instead of using ClangTool's
ability to override all files at once, use a custom FrontendAction and override
only the source (and eventually headers) the action is about to parse.

Use of newFrontendActionFactory() is replaced with a new factory maker provided
by Transform.



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183855 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: Decluttering Transform.h

Moving RewriteContainer's constructor impl to Transform.cpp to reduce clutter.
More things will soon be added to this header.



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183856 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: Replace file override container

A more flexible container for storing overrides is required for headers. Before
a source goes through the transform pipeline, any headers it references will be
in their original state and unaffected by transforms applied to other sources.
Therefore overrides for headers need to be kept separate for each source file.

This patch doesn't introduce support for storing header overrides yet. It only
replaces the existing structure and makes any necessary changes to support it.



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183910 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: Add headers to file override information

File override structures now contain per-source overrides for headers.

For now, modified headers are written to disk when the Migrator is done.
This is only temporary behaviour since we can expect headers to be
changed by migrating multiple source files. The changes need to be
merged after all migrations are complete.



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183917 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: const-correcting IncludeExcludeInfo

isFileIncluded() needed to be marked const.



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183918 91177308-0d34-0410-b5e6-96231b3b80d8
Also install cpp11-migrate when built with cmake. Fixes bug #16296

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183976 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: Fixing section markup

Adhering to LLVM's ReST style for section markup.



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183981 91177308-0d34-0410-b5e6-96231b3b80d8
Force c++98 so this works on windows where c++11 is the default.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183983 91177308-0d34-0410-b5e6-96231b3b80d8
Add a dependency on LLVM's option library for clang-tools-extra

r183989 added a dependency on LLVMOption in clangFrontend.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183990 91177308-0d34-0410-b5e6-96231b3b80d8
sys::Path::GetCurrentDirectory has been removed. Use sys::fs::current_path.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@184004 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "sys::Path::GetCurrentDirectory has been removed. Use sys::fs::current_path."

This reverts commit r184004.

This test has some dependency on the behavior of the old function on windows. I
added it back to llvm for now.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@184010 91177308-0d34-0410-b5e6-96231b3b80d8