From dd82b9dcd3e8151fde7f3aed5b4f8a575ac98e12 Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Tue, 12 Nov 2019 11:10:36 -0800 Subject: [PATCH] [arm64] Bring this branch in a compilable state. --- .../Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp index dce2bad693f04..0339d090bb4f0 100644 --- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp +++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp @@ -2677,8 +2677,7 @@ size_t ObjectFileMachO::ParseSymtab() { // Next we need to determine the correct path for the dyld shared cache. - ArchSpec header_arch; - GetArchitecture(header_arch); + ArchSpec header_arch = GetArchitecture(); char dsc_path[PATH_MAX]; char dsc_path_development[PATH_MAX]; @@ -2876,9 +2875,12 @@ size_t ObjectFileMachO::ParseSymtab() { nlist_index++) { ///////////////////////////// { - struct nlist_64 nlist; - if (!ParseNList(dsc_local_symbols_data, nlist_data_offset, nlist_byte_size, nlist) + llvm::Optional nlist_maybe = + ParseNList(dsc_local_symbols_data, nlist_data_offset, + nlist_byte_size); + if (!nlist_maybe) break; + struct nlist_64 nlist = *nlist_maybe; SymbolType type = eSymbolTypeInvalid; const char *symbol_name = dsc_local_symbols_data.PeekCStr(