diff options
author | Andrew V. Tischenko <andrew.v.tischenko@gmail.com> | 2018-04-10 10:34:13 +0000 |
---|---|---|
committer | Andrew V. Tischenko <andrew.v.tischenko@gmail.com> | 2018-04-10 10:34:13 +0000 |
commit | d3f7881f4d6b0c3c9aa0dba7d379954386c92d40 (patch) | |
tree | a16127e9020be35381cfe906dc18f20c76002c4e /lib/Frontend/ASTMerge.cpp | |
parent | 96176cafb82cab5ff75d485abbd90d5e10200fe6 (diff) | |
download | clang-d3f7881f4d6b0c3c9aa0dba7d379954386c92d40.tar.gz |
-ftime-report switch support in Clang.
The current support of the feature produces only 2 lines in report:
-Some general Code Generation Time;
-Total time of Backend Consumer actions.
This patch extends Clang time report with new lines related to Preprocessor, Include Filea Search, Parsing, etc.
Differential Revision: https://reviews.llvm.org/D43578
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@329684 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/ASTMerge.cpp')
-rw-r--r-- | lib/Frontend/ASTMerge.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Frontend/ASTMerge.cpp b/lib/Frontend/ASTMerge.cpp index 6ec0e2a98c..b1a3407a42 100644 --- a/lib/Frontend/ASTMerge.cpp +++ b/lib/Frontend/ASTMerge.cpp @@ -6,13 +6,14 @@ // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// -#include "clang/Frontend/ASTUnit.h" #include "clang/AST/ASTContext.h" #include "clang/AST/ASTDiagnostic.h" #include "clang/AST/ASTImporter.h" #include "clang/Basic/Diagnostic.h" +#include "clang/Frontend/ASTUnit.h" #include "clang/Frontend/CompilerInstance.h" #include "clang/Frontend/FrontendActions.h" +#include "llvm/Support/Timer.h" using namespace clang; @@ -31,6 +32,8 @@ bool ASTMergeAction::BeginSourceFileAction(CompilerInstance &CI) { } void ASTMergeAction::ExecuteAction() { + llvm::NamedRegionTimer T("astmerge", "AST Merge actions", GroupName, + GroupDescription, llvm::TimePassesIsEnabled); CompilerInstance &CI = getCompilerInstance(); CI.getDiagnostics().getClient()->BeginSourceFile( CI.getASTContext().getLangOpts()); |