[Support] Add TimeTraceScope constructor without detail arg
This simplifies code where no extra details are required
Also don't write out detail when it is empty.
Differential Revision: https://reviews.llvm.org/D71347
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index a226166..c54d15d 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -896,7 +896,7 @@
{
PrettyStackTraceString CrashInfo("Per-function optimization");
- llvm::TimeTraceScope TimeScope("PerFunctionPasses", StringRef(""));
+ llvm::TimeTraceScope TimeScope("PerFunctionPasses");
PerFunctionPasses.doInitialization();
for (Function &F : *TheModule)
@@ -907,13 +907,13 @@
{
PrettyStackTraceString CrashInfo("Per-module optimization passes");
- llvm::TimeTraceScope TimeScope("PerModulePasses", StringRef(""));
+ llvm::TimeTraceScope TimeScope("PerModulePasses");
PerModulePasses.run(*TheModule);
}
{
PrettyStackTraceString CrashInfo("Code generation");
- llvm::TimeTraceScope TimeScope("CodeGenPasses", StringRef(""));
+ llvm::TimeTraceScope TimeScope("CodeGenPasses");
CodeGenPasses.run(*TheModule);
}
@@ -1499,7 +1499,7 @@
BackendAction Action,
std::unique_ptr<raw_pwrite_stream> OS) {
- llvm::TimeTraceScope TimeScope("Backend", StringRef(""));
+ llvm::TimeTraceScope TimeScope("Backend");
std::unique_ptr<llvm::Module> EmptyModule;
if (!CGOpts.ThinLTOIndexFile.empty()) {