Simplify ObjectFile::GetArchitecture
authorPavel Labath <pavel@labath.sk>
Thu, 3 Jan 2019 10:37:19 +0000 (10:37 +0000)
committerPavel Labath <pavel@labath.sk>
Thu, 3 Jan 2019 10:37:19 +0000 (10:37 +0000)
commitf760f5aef404b0767c06f64da219032e3e7bb3bd
tree2b87b4cb47e47a1550ba4631f67deb642fc1f146
parent4d752a88e828120d51187beb51773300118200b2
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
25 files changed:
lldb/include/lldb/Core/Module.h
lldb/include/lldb/Expression/IRExecutionUnit.h
lldb/include/lldb/Symbol/ObjectFile.h
lldb/include/lldb/Symbol/UnwindTable.h
lldb/include/lldb/Utility/ArchSpec.h
lldb/source/Core/Module.cpp
lldb/source/Expression/IRExecutionUnit.cpp
lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp
lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.h
lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp
lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.h
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/source/Symbol/CompactUnwindInfo.cpp
lldb/source/Symbol/DWARFCallFrameInfo.cpp
lldb/source/Symbol/FuncUnwinders.cpp
lldb/source/Symbol/Type.cpp
lldb/source/Symbol/UnwindTable.cpp
lldb/unittests/Utility/ArchSpecTest.cpp