From f343968f5d87a91e020a5baf03c280ce7aa9cdb1 Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Tue, 9 Aug 2016 23:06:08 +0000 Subject: Delete Host/windows/win32.h It's always hard to remember when to include this file, and when you do include it it's hard to remember what preprocessor check it needs to be behind, and then you further have to remember whether it's windows.h or win32.h which you need to include. This patch changes the name to PosixApi.h, which is more appropriately named, and makes it independent of any preprocessor setting. There's still the issue of people not knowing when to include this, because there's not a well-defined set of things it exposes other than "whatever is missing on Windows", but at least this should make it less painful to fix when problems arise. This patch depends on LLVM revision r278170. llvm-svn: 278177 --- lldb/source/Core/Module.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'lldb/source/Core/Module.cpp') diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp index 5fe39abda18..b7076c0f132 100644 --- a/lldb/source/Core/Module.cpp +++ b/lldb/source/Core/Module.cpp @@ -121,7 +121,7 @@ namespace lldb { Mutex::Locker locker (Module::GetAllocationModuleCollectionMutex()); ModuleCollection &modules = GetModuleCollection(); const size_t count = modules.size(); - printf ("%s: %" PRIu64 " modules:\n", __PRETTY_FUNCTION__, (uint64_t)count); + printf ("%s: %" PRIu64 " modules:\n", LLVM_PRETTY_FUNCTION, (uint64_t)count); for (size_t i = 0; i < count; ++i) { @@ -476,7 +476,7 @@ size_t Module::GetNumCompileUnits() { std::lock_guard guard(m_mutex); - Timer scoped_timer(__PRETTY_FUNCTION__, + Timer scoped_timer(LLVM_PRETTY_FUNCTION, "Module::GetNumCompileUnits (module = %p)", static_cast(this)); SymbolVendor *symbols = GetSymbolVendor (); @@ -505,7 +505,7 @@ bool Module::ResolveFileAddress (lldb::addr_t vm_addr, Address& so_addr) { std::lock_guard guard(m_mutex); - Timer scoped_timer(__PRETTY_FUNCTION__, "Module::ResolveFileAddress (vm_addr = 0x%" PRIx64 ")", vm_addr); + Timer scoped_timer(LLVM_PRETTY_FUNCTION, "Module::ResolveFileAddress (vm_addr = 0x%" PRIx64 ")", vm_addr); SectionList *section_list = GetSectionList(); if (section_list) return so_addr.ResolveAddressUsingFileSections(vm_addr, section_list); @@ -668,7 +668,7 @@ uint32_t Module::ResolveSymbolContextsForFileSpec (const FileSpec &file_spec, uint32_t line, bool check_inlines, uint32_t resolve_scope, SymbolContextList& sc_list) { std::lock_guard guard(m_mutex); - Timer scoped_timer(__PRETTY_FUNCTION__, + Timer scoped_timer(LLVM_PRETTY_FUNCTION, "Module::ResolveSymbolContextForFilePath (%s:%u, check_inlines = %s, resolve_scope = 0x%8.8x)", file_spec.GetPath().c_str(), line, @@ -1086,7 +1086,7 @@ Module::FindTypes_Impl (const SymbolContext& sc, llvm::DenseSet &searched_symbol_files, TypeMap& types) { - Timer scoped_timer(__PRETTY_FUNCTION__, __PRETTY_FUNCTION__); + Timer scoped_timer(LLVM_PRETTY_FUNCTION, LLVM_PRETTY_FUNCTION); if (!sc.module_sp || sc.module_sp.get() == this) { SymbolVendor *symbols = GetSymbolVendor (); @@ -1191,7 +1191,7 @@ Module::GetSymbolVendor (bool can_create, lldb_private::Stream *feedback_strm) ObjectFile *obj_file = GetObjectFile (); if (obj_file != nullptr) { - Timer scoped_timer(__PRETTY_FUNCTION__, __PRETTY_FUNCTION__); + Timer scoped_timer(LLVM_PRETTY_FUNCTION, LLVM_PRETTY_FUNCTION); m_symfile_ap.reset(SymbolVendor::FindPlugin(shared_from_this(), feedback_strm)); m_did_load_symbol_vendor = true; } @@ -1438,7 +1438,7 @@ Module::GetObjectFile() std::lock_guard guard(m_mutex); if (!m_did_load_objfile.load()) { - Timer scoped_timer(__PRETTY_FUNCTION__, + Timer scoped_timer(LLVM_PRETTY_FUNCTION, "Module::GetObjectFile () module = %s", GetFileSpec().GetFilename().AsCString("")); DataBufferSP data_sp; lldb::offset_t data_offset = 0; @@ -1509,7 +1509,7 @@ Module::GetUnifiedSectionList() const Symbol * Module::FindFirstSymbolWithNameAndType (const ConstString &name, SymbolType symbol_type) { - Timer scoped_timer(__PRETTY_FUNCTION__, + Timer scoped_timer(LLVM_PRETTY_FUNCTION, "Module::FindFirstSymbolWithNameAndType (name = %s, type = %i)", name.AsCString(), symbol_type); @@ -1547,7 +1547,7 @@ Module::FindFunctionSymbols (const ConstString &name, uint32_t name_type_mask, SymbolContextList& sc_list) { - Timer scoped_timer(__PRETTY_FUNCTION__, + Timer scoped_timer(LLVM_PRETTY_FUNCTION, "Module::FindSymbolsFunctions (name = %s, mask = 0x%8.8x)", name.AsCString(), name_type_mask); @@ -1567,7 +1567,7 @@ Module::FindSymbolsWithNameAndType (const ConstString &name, SymbolType symbol_t // No need to protect this call using m_mutex all other method calls are // already thread safe. - Timer scoped_timer(__PRETTY_FUNCTION__, + Timer scoped_timer(LLVM_PRETTY_FUNCTION, "Module::FindSymbolsWithNameAndType (name = %s, type = %i)", name.AsCString(), symbol_type); @@ -1592,7 +1592,7 @@ Module::FindSymbolsMatchingRegExAndType (const RegularExpression ®ex, SymbolT // No need to protect this call using m_mutex all other method calls are // already thread safe. - Timer scoped_timer(__PRETTY_FUNCTION__, + Timer scoped_timer(LLVM_PRETTY_FUNCTION, "Module::FindSymbolsMatchingRegExAndType (regex = %s, type = %i)", regex.GetText(), symbol_type); -- cgit v1.2.3