From adb39737a2e88fac8c6f36155ac26e4bc413056b Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Thu, 14 May 2020 01:06:32 +0000 Subject: [PATCH] fix gcc-9.3 compile errors --- lldb/source/API/SystemInitializerFull.cpp | 2 +- lldb/source/Core/Module.cpp | 6 +++--- lldb/source/Initialization/SystemInitializerCommon.cpp | 4 ++-- lldb/source/Interpreter/CommandInterpreter.cpp | 4 ++-- .../ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp | 2 +- .../Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp | 2 +- .../ScriptInterpreter/Python/ScriptInterpreterPython.cpp | 6 +++--- lldb/source/Symbol/Symtab.cpp | 2 +- lldb/tools/lldb-test/SystemInitializerTest.cpp | 2 +- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/lldb/source/API/SystemInitializerFull.cpp b/lldb/source/API/SystemInitializerFull.cpp index 7f95e7acf62ab..ce49c7de699d7 100644 --- a/lldb/source/API/SystemInitializerFull.cpp +++ b/lldb/source/API/SystemInitializerFull.cpp @@ -57,7 +57,7 @@ llvm::Error SystemInitializerFull::Initialize() { void SystemInitializerFull::Terminate() { static Timer::Category func_cat(LLVM_PRETTY_FUNCTION); - Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION); + Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION); Debugger::SettingsTerminate(); diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp index ed69796d88c2a..d6b6287f3f8d2 100644 --- a/lldb/source/Core/Module.cpp +++ b/lldb/source/Core/Module.cpp @@ -927,7 +927,7 @@ void Module::FindTypes_Impl( llvm::DenseSet &searched_symbol_files, TypeMap &types) { static Timer::Category func_cat(LLVM_PRETTY_FUNCTION); - Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION); + Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION); if (SymbolFile *symbols = GetSymbolFile()) symbols->FindTypes(name, parent_decl_ctx, max_matches, searched_symbol_files, types); @@ -1015,7 +1015,7 @@ void Module::FindTypes( llvm::DenseSet &searched_symbol_files, TypeMap &types) { static Timer::Category func_cat(LLVM_PRETTY_FUNCTION); - Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION); + Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION); if (SymbolFile *symbols = GetSymbolFile()) symbols->FindTypes(pattern, languages, searched_symbol_files, types); } @@ -1027,7 +1027,7 @@ SymbolFile *Module::GetSymbolFile(bool can_create, Stream *feedback_strm) { ObjectFile *obj_file = GetObjectFile(); if (obj_file != nullptr) { static Timer::Category func_cat(LLVM_PRETTY_FUNCTION); - Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION); + Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION); m_symfile_up.reset( SymbolVendor::FindPlugin(shared_from_this(), feedback_strm)); m_did_load_symfile = true; diff --git a/lldb/source/Initialization/SystemInitializerCommon.cpp b/lldb/source/Initialization/SystemInitializerCommon.cpp index 0cef2a48dcb46..0c97ebb5fe1fa 100644 --- a/lldb/source/Initialization/SystemInitializerCommon.cpp +++ b/lldb/source/Initialization/SystemInitializerCommon.cpp @@ -106,7 +106,7 @@ llvm::Error SystemInitializerCommon::Initialize() { return error; static Timer::Category func_cat(LLVM_PRETTY_FUNCTION); - Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION); + Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION); process_gdb_remote::ProcessGDBRemoteLog::Initialize(); @@ -122,7 +122,7 @@ llvm::Error SystemInitializerCommon::Initialize() { void SystemInitializerCommon::Terminate() { static Timer::Category func_cat(LLVM_PRETTY_FUNCTION); - Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION); + Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION); #if defined(_WIN32) ProcessWindowsLog::Terminate(); diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index 2cc3d47406b7f..a936dfb205f8f 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -207,7 +207,7 @@ bool CommandInterpreter::GetSpaceReplPrompts() const { void CommandInterpreter::Initialize() { static Timer::Category func_cat(LLVM_PRETTY_FUNCTION); - Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION); + Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION); CommandReturnObject result; @@ -452,7 +452,7 @@ const char *CommandInterpreter::ProcessEmbeddedScriptCommands(const char *arg) { void CommandInterpreter::LoadCommandDictionary() { static Timer::Category func_cat(LLVM_PRETTY_FUNCTION); - Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION); + Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION); lldb::ScriptLanguage script_language = m_debugger.GetScriptLanguage(); diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp index 4a07c792eebba..743a1d1a22039 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -1892,7 +1892,7 @@ void AppleObjCRuntimeV2::UpdateISAToDescriptorMapIfNeeded() { Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_TYPES)); static Timer::Category func_cat(LLVM_PRETTY_FUNCTION); - Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION); + Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION); // Else we need to check with our process to see when the map was updated. Process *process = GetProcess(); diff --git a/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp b/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp index f9b24ad83de51..3715e3b27a9bb 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp @@ -68,7 +68,7 @@ bool ScriptInterpreterLua::ExecuteOneLine(llvm::StringRef command, void ScriptInterpreterLua::ExecuteInterpreterLoop() { static Timer::Category func_cat(LLVM_PRETTY_FUNCTION); - Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION); + Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION); Debugger &debugger = m_debugger; diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp index 6f266772624a7..78f8c5b458475 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp @@ -1067,7 +1067,7 @@ bool ScriptInterpreterPythonImpl::ExecuteOneLine( void ScriptInterpreterPythonImpl::ExecuteInterpreterLoop() { static Timer::Category func_cat(LLVM_PRETTY_FUNCTION); - Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION); + Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION); Debugger &debugger = m_debugger; @@ -2238,7 +2238,7 @@ bool ScriptInterpreterPythonImpl::GetScriptedSummary( const TypeSummaryOptions &options, std::string &retval) { static Timer::Category func_cat(LLVM_PRETTY_FUNCTION); - Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION); + Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION); if (!valobj.get()) { retval.assign(""); @@ -3237,7 +3237,7 @@ void ScriptInterpreterPythonImpl::InitializePrivate() { g_initialized = true; static Timer::Category func_cat(LLVM_PRETTY_FUNCTION); - Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION); + Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION); // RAII-based initialization which correctly handles multiple-initialization, // version- specific differences among Python 2 and Python 3, and saving and diff --git a/lldb/source/Symbol/Symtab.cpp b/lldb/source/Symbol/Symtab.cpp index 3f697e6076b37..0b6f71d0260ad 100644 --- a/lldb/source/Symbol/Symtab.cpp +++ b/lldb/source/Symbol/Symtab.cpp @@ -568,7 +568,7 @@ void Symtab::SortSymbolIndexesByValue(std::vector &indexes, std::lock_guard guard(m_mutex); static Timer::Category func_cat(LLVM_PRETTY_FUNCTION); - Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION); + Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION); // No need to sort if we have zero or one items... if (indexes.size() <= 1) return; diff --git a/lldb/tools/lldb-test/SystemInitializerTest.cpp b/lldb/tools/lldb-test/SystemInitializerTest.cpp index 10b90cdc64096..05e125773fdd1 100644 --- a/lldb/tools/lldb-test/SystemInitializerTest.cpp +++ b/lldb/tools/lldb-test/SystemInitializerTest.cpp @@ -55,7 +55,7 @@ llvm::Error SystemInitializerTest::Initialize() { void SystemInitializerTest::Terminate() { static Timer::Category func_cat(LLVM_PRETTY_FUNCTION); - Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION); + Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION); Debugger::SettingsTerminate();