projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3dd0a89
)
Fix compilation error in ObjectFileMachO::ParseSymtab
author
Vedant Kumar
<vsk@apple.com>
Fri, 25 Oct 2019 18:16:51 +0000
(11:16 -0700)
committer
Vedant Kumar
<vsk@apple.com>
Fri, 25 Oct 2019 18:16:51 +0000
(11:16 -0700)
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
patch
|
blob
|
history
diff --git
a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index
70e0997
..
d82a1ad
100644
(file)
--- a/
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@
-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(