diff options
author | Pavel Labath <pavel@labath.sk> | 2019-01-03 10:37:19 +0000 |
---|---|---|
committer | Pavel Labath <pavel@labath.sk> | 2019-01-03 10:37:19 +0000 |
commit | f760f5aef404b0767c06f64da219032e3e7bb3bd (patch) | |
tree | 2b87b4cb47e47a1550ba4631f67deb642fc1f146 /lldb/source/Plugins/Process | |
parent | 4d752a88e828120d51187beb51773300118200b2 (diff) | |
download | bcm5719-llvm-f760f5aef404b0767c06f64da219032e3e7bb3bd.tar.gz bcm5719-llvm-f760f5aef404b0767c06f64da219032e3e7bb3bd.zip |
Simplify ObjectFile::GetArchitecture
Summary:
instead of returning the architecture through by-ref argument and a
boolean value indicating success, we can just return the ArchSpec
directly. Since the ArchSpec already has an invalid state, it can be
used to denote the failure without the additional bool.
Reviewers: clayborg, zturner, espindola
Subscribers: emaste, arichardson, JDevlieghere, lldb-commits
Differential Revision: https://reviews.llvm.org/D56129
llvm-svn: 350291
Diffstat (limited to 'lldb/source/Plugins/Process')
-rw-r--r-- | lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp index e5aabe343f5..7d66461c15b 100644 --- a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp +++ b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp @@ -736,8 +736,7 @@ uint32_t ProcessElfCore::GetNumThreadContexts() { } ArchSpec ProcessElfCore::GetArchitecture() { - ArchSpec arch; - m_core_module_sp->GetObjectFile()->GetArchitecture(arch); + ArchSpec arch = m_core_module_sp->GetObjectFile()->GetArchitecture(); ArchSpec target_arch = GetTarget().GetArchitecture(); arch.MergeFrom(target_arch); |