llvm-project/lldb
Konrad Kleine c671639af6 [lldb] NFC: refactor CompileUnit::ResolveSymbolContext
Summary:
I found the above named method hard to read because it had

a) many nested blocks,
b) one return statement at the end with some logic involved,
c) a duplicated while-loop with just small differences in it.

I decided to refactor this function by employing an early exit strategy.
In order to capture the logic in the return statement and to not have it
repeated more than once I chose to implement a very small lamda function
that captures all the variables it needs.
I also replaced the two while-loops with just one.

This is a non-functional change (NFC).

Reviewers: jdoerfert, teemperor

Reviewed By: teemperor

Subscribers: labath, teemperor, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D70774
2019-11-28 21:37:31 +01:00
..
cmake Revert "[CMake] Re-enable -Wno-gnu-anonymous-struct & -Wno-nested-anon-types." 2019-11-18 17:00:35 -08:00
docs [Docs] Generate the LLDB man page with Sphinx 2019-11-21 10:04:11 -08:00
examples [Examples] Move structured-data unpacking out of the loop. (NFC) 2019-11-22 15:43:39 -08:00
include/lldb [lldb] NFC: refactor CompileUnit::ResolveSymbolContext 2019-11-28 21:37:31 +01:00
packages/Python/lldbsuite Revert "Revert "As a follow-up to my initial mail to llvm-dev here's a first pass at the O1 described there."" 2019-11-26 20:28:52 -08:00
resources [CMake] Revised LLDB.framework builds 2019-01-04 12:46:50 +00:00
scripts [LLDB][Python] remove ArgInfo::count 2019-11-04 12:48:49 -08:00
source [lldb] NFC: refactor CompileUnit::ResolveSymbolContext 2019-11-28 21:37:31 +01:00
test [LLDB] [test] Add a missing "REQUIRES: arm" line 2019-11-28 13:18:15 +02:00
third_party/Python/module Increase timeout in pexpect to lower chances of tests failing under ASAN. 2019-10-10 16:16:49 +00:00
tools [lldb] fix a -Wcast-qual warning 2019-11-26 14:49:16 +01:00
unittests [lldb] Add FileSpec::Equal unit tests 2019-11-28 14:31:52 +01:00
utils [LLDB] Fix inline variable only used in assertion. (NFC) 2019-10-25 15:47:17 -07:00
.arcconfig
.clang-format
.gitignore Add .noindex to the gitignore 2019-04-05 17:57:42 +00:00
CMakeLists.txt [lldb] Record framework build path and use it everywhere 2019-11-06 14:05:35 -08:00
CODE_OWNERS.txt [lldb][NFC] Cleanup mentions and code related to lldb-mi 2019-07-19 15:55:23 +00:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
use_lldb_suite_root.py