[all-commits] [llvm/llvm-project] 373e2a: [lldb] NFC: refactor CompileUnit::ResolveSymbolCon...
Konrad Kleine via All-commits
all-commits at lists.llvm.org
Thu Nov 28 05:03:14 PST 2019
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 373e2a4f69d623e59329ff801f261d8b299e12d2
https://github.com/llvm/llvm-project/commit/373e2a4f69d623e59329ff801f261d8b299e12d2
Author: Konrad Kleine <kkleine at redhat.com>
Date: 2019-11-28 (Thu, 28 Nov 2019)
Changed paths:
M lldb/include/lldb/Symbol/CompileUnit.h
M lldb/source/API/SBThread.cpp
M lldb/source/Core/AddressResolverFileLine.cpp
M lldb/source/Symbol/CompileUnit.cpp
Log Message:
-----------
[lldb] NFC: refactor CompileUnit::ResolveSymbolContext
Summary:
I found the above named method hard to read because it had
a) many nested blocks and
b) one return statement at the end with some logic involved.
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.
This is a non-functional change (NFC).
Reviewers: jdoerfert
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D70774
More information about the All-commits
mailing list