Try to fix sanitizer-x86_64-linux-fast bot due to change in r328820.

llvm-svn: 328824
This commit is contained in:
Kevin Enderby 2018-03-29 20:49:24 +00:00
parent 89310f56c8
commit 4129308413

View File

@ -1591,7 +1591,7 @@ dumpSymbolNamesFromObject(SymbolicFile &Obj, bool printName,
// Trying adding symbol from the function starts table and LC_MAIN entry // Trying adding symbol from the function starts table and LC_MAIN entry
// point. // point.
SmallVector<uint64_t, 8> FoundFns; SmallVector<uint64_t, 8> FoundFns;
int64_t lc_main_offset = -1; uint64_t lc_main_offset = UINT64_MAX;
for (const auto &Command : MachO->load_commands()) { for (const auto &Command : MachO->load_commands()) {
if (Command.C.cmd == MachO::LC_FUNCTION_STARTS) { if (Command.C.cmd == MachO::LC_FUNCTION_STARTS) {
// We found a function starts segment, parse the addresses for // We found a function starts segment, parse the addresses for
@ -1653,7 +1653,7 @@ dumpSymbolNamesFromObject(SymbolicFile &Obj, bool printName,
F.NDesc = 0; F.NDesc = 0;
F.IndirectName = StringRef(); F.IndirectName = StringRef();
SymbolList.push_back(F); SymbolList.push_back(F);
if (FoundFns[f] == (uint64_t)lc_main_offset) if (FoundFns[f] == lc_main_offset)
FOS << "<redacted LC_MAIN>"; FOS << "<redacted LC_MAIN>";
else else
FOS << "<redacted function " << f << ">"; FOS << "<redacted function " << f << ">";