From 5c0aa31c3cb448065f12ede53e4dd54a9a98f650 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sun, 12 Jan 2025 13:17:49 -0800 Subject: -ftime-report: Move FrontendTimer closer to TimeTraceScope ... to improve consistency and make "Clang time report" cover `FrontendAction::BeginSourceFile` and `FrontendAction::EndSourceFile`. --- clang/lib/Frontend/FrontendAction.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'clang/lib/Frontend/FrontendAction.cpp') diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp index 9a50e745..9f789f0 100644 --- a/clang/lib/Frontend/FrontendAction.cpp +++ b/clang/lib/Frontend/FrontendAction.cpp @@ -1069,12 +1069,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI, llvm::Error FrontendAction::Execute() { CompilerInstance &CI = getCompilerInstance(); - - if (CI.hasFrontendTimer()) { - llvm::TimeRegion Timer(CI.getFrontendTimer()); - ExecuteAction(); - } - else ExecuteAction(); + ExecuteAction(); // If we are supposed to rebuild the global module index, do so now unless // there were any module-build failures. -- cgit v1.1