Skip to content

Commit 18a57e2

Browse files
authored
Merge pull request #291 from dcci/halber-mensch
[arm64] Bring this branch in a compilable state.
2 parents e5324e0 + dd82b9d commit 18a57e2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2677,8 +2677,7 @@ size_t ObjectFileMachO::ParseSymtab() {
26772677

26782678
// Next we need to determine the correct path for the dyld shared cache.
26792679

2680-
ArchSpec header_arch;
2681-
GetArchitecture(header_arch);
2680+
ArchSpec header_arch = GetArchitecture();
26822681
char dsc_path[PATH_MAX];
26832682
char dsc_path_development[PATH_MAX];
26842683

@@ -2876,9 +2875,12 @@ size_t ObjectFileMachO::ParseSymtab() {
28762875
nlist_index++) {
28772876
/////////////////////////////
28782877
{
2879-
struct nlist_64 nlist;
2880-
if (!ParseNList(dsc_local_symbols_data, nlist_data_offset, nlist_byte_size, nlist)
2878+
llvm::Optional<struct nlist_64> nlist_maybe =
2879+
ParseNList(dsc_local_symbols_data, nlist_data_offset,
2880+
nlist_byte_size);
2881+
if (!nlist_maybe)
28812882
break;
2883+
struct nlist_64 nlist = *nlist_maybe;
28822884

28832885
SymbolType type = eSymbolTypeInvalid;
28842886
const char *symbol_name = dsc_local_symbols_data.PeekCStr(

0 commit comments

Comments
 (0)