diff options
author | Kate Stone <katherine.stone@apple.com> | 2016-09-06 20:57:50 +0000 |
---|---|---|
committer | Kate Stone <katherine.stone@apple.com> | 2016-09-06 20:57:50 +0000 |
commit | b9c1b51e45b845debb76d8658edabca70ca56079 (patch) | |
tree | dfcb5a13ef2b014202340f47036da383eaee74aa /lldb/source/Core/FileLineResolver.cpp | |
parent | d5aa73376966339caad04013510626ec2e42c760 (diff) | |
download | bcm5719-llvm-b9c1b51e45b845debb76d8658edabca70ca56079.tar.gz bcm5719-llvm-b9c1b51e45b845debb76d8658edabca70ca56079.zip |
*** This commit represents a complete reformatting of the LLDB source code
*** to conform to clang-format’s LLVM style. This kind of mass change has
*** two obvious implications:
Firstly, merging this particular commit into a downstream fork may be a huge
effort. Alternatively, it may be worth merging all changes up to this commit,
performing the same reformatting operation locally, and then discarding the
merge for this particular commit. The commands used to accomplish this
reformatting were as follows (with current working directory as the root of
the repository):
find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} +
find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ;
The version of clang-format used was 3.9.0, and autopep8 was 1.2.4.
Secondly, “blame” style tools will generally point to this commit instead of
a meaningful prior commit. There are alternatives available that will attempt
to look through this change and find the appropriate prior commit. YMMV.
llvm-svn: 280751
Diffstat (limited to 'lldb/source/Core/FileLineResolver.cpp')
-rw-r--r-- | lldb/source/Core/FileLineResolver.cpp | 126 |
1 files changed, 48 insertions, 78 deletions
diff --git a/lldb/source/Core/FileLineResolver.cpp b/lldb/source/Core/FileLineResolver.cpp index e8ef87f009d..db56cae9e9b 100644 --- a/lldb/source/Core/FileLineResolver.cpp +++ b/lldb/source/Core/FileLineResolver.cpp @@ -21,96 +21,66 @@ using namespace lldb_private; //---------------------------------------------------------------------- // FileLineResolver: //---------------------------------------------------------------------- -FileLineResolver::FileLineResolver -( - const FileSpec &file_spec, - uint32_t line_no, - bool check_inlines -) : - Searcher (), - m_file_spec (file_spec), - m_line_number (line_no), - m_inlines (check_inlines) -{ -} +FileLineResolver::FileLineResolver(const FileSpec &file_spec, uint32_t line_no, + bool check_inlines) + : Searcher(), m_file_spec(file_spec), m_line_number(line_no), + m_inlines(check_inlines) {} -FileLineResolver::~FileLineResolver () -{ -} +FileLineResolver::~FileLineResolver() {} Searcher::CallbackReturn -FileLineResolver::SearchCallback -( - SearchFilter &filter, - SymbolContext &context, - Address *addr, - bool containing -) -{ - CompileUnit *cu = context.comp_unit; +FileLineResolver::SearchCallback(SearchFilter &filter, SymbolContext &context, + Address *addr, bool containing) { + CompileUnit *cu = context.comp_unit; - if (m_inlines || m_file_spec.Compare(*cu, m_file_spec, (bool)m_file_spec.GetDirectory())) - { - uint32_t start_file_idx = 0; - uint32_t file_idx = cu->GetSupportFiles().FindFileIndex(start_file_idx, m_file_spec, false); - if (file_idx != UINT32_MAX) - { - LineTable *line_table = cu->GetLineTable(); - if (line_table) - { - if (m_line_number == 0) - { - // Match all lines in a file... - const bool append = true; - while (file_idx != UINT32_MAX) - { - line_table->FineLineEntriesForFileIndex (file_idx, append, m_sc_list); - // Get the next file index in case we have multiple file - // entries for the same file - file_idx = cu->GetSupportFiles().FindFileIndex(file_idx + 1, m_file_spec, false); - } - } - else - { - // Match a specific line in a file... - } - } + if (m_inlines || + m_file_spec.Compare(*cu, m_file_spec, (bool)m_file_spec.GetDirectory())) { + uint32_t start_file_idx = 0; + uint32_t file_idx = + cu->GetSupportFiles().FindFileIndex(start_file_idx, m_file_spec, false); + if (file_idx != UINT32_MAX) { + LineTable *line_table = cu->GetLineTable(); + if (line_table) { + if (m_line_number == 0) { + // Match all lines in a file... + const bool append = true; + while (file_idx != UINT32_MAX) { + line_table->FineLineEntriesForFileIndex(file_idx, append, + m_sc_list); + // Get the next file index in case we have multiple file + // entries for the same file + file_idx = cu->GetSupportFiles().FindFileIndex(file_idx + 1, + m_file_spec, false); + } + } else { + // Match a specific line in a file... } + } } - return Searcher::eCallbackReturnContinue; + } + return Searcher::eCallbackReturnContinue; } -Searcher::Depth -FileLineResolver::GetDepth() -{ - return Searcher::eDepthCompUnit; +Searcher::Depth FileLineResolver::GetDepth() { + return Searcher::eDepthCompUnit; } -void -FileLineResolver::GetDescription (Stream *s) -{ - s->Printf ("File and line resolver for file: \"%s\" line: %u", - m_file_spec.GetPath().c_str(), - m_line_number); +void FileLineResolver::GetDescription(Stream *s) { + s->Printf("File and line resolver for file: \"%s\" line: %u", + m_file_spec.GetPath().c_str(), m_line_number); } -void -FileLineResolver::Clear() -{ - m_file_spec.Clear(); - m_line_number = UINT32_MAX; - m_sc_list.Clear(); - m_inlines = true; +void FileLineResolver::Clear() { + m_file_spec.Clear(); + m_line_number = UINT32_MAX; + m_sc_list.Clear(); + m_inlines = true; } -void -FileLineResolver::Reset (const FileSpec &file_spec, - uint32_t line, - bool check_inlines) -{ - m_file_spec = file_spec; - m_line_number = line; - m_sc_list.Clear(); - m_inlines = check_inlines; +void FileLineResolver::Reset(const FileSpec &file_spec, uint32_t line, + bool check_inlines) { + m_file_spec = file_spec; + m_line_number = line; + m_sc_list.Clear(); + m_inlines = check_inlines; } - |