Fix compilation error in ObjectFileMachO::ParseSymtab

This commit is contained in:
Vedant Kumar 2019-10-25 11:16:51 -07:00
parent 3dd0a896b6
commit 72105b9dcd
1 changed files with 5 additions and 2 deletions

View File

@ -2737,9 +2737,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<struct nlist_64> 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(