Try to fix sanitizer-x86_64-linux-fast bot due to change in r328820.
authorKevin Enderby <enderby@apple.com>
Thu, 29 Mar 2018 20:49:24 +0000 (20:49 +0000)
committerKevin Enderby <enderby@apple.com>
Thu, 29 Mar 2018 20:49:24 +0000 (20:49 +0000)
llvm-svn: 328824

llvm/tools/llvm-nm/llvm-nm.cpp

index 4282a60..6a4f997 100644 (file)
@@ -1591,7 +1591,7 @@ dumpSymbolNamesFromObject(SymbolicFile &Obj, bool printName,
       // Trying adding symbol from the function starts table and LC_MAIN entry
       // point.
       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()) {
         if (Command.C.cmd == MachO::LC_FUNCTION_STARTS) {
           // We found a function starts segment, parse the addresses for 
@@ -1653,7 +1653,7 @@ dumpSymbolNamesFromObject(SymbolicFile &Obj, bool printName,
           F.NDesc = 0;
           F.IndirectName = StringRef();
           SymbolList.push_back(F);
-          if (FoundFns[f] == (uint64_t)lc_main_offset)
+          if (FoundFns[f] == lc_main_offset)
             FOS << "<redacted LC_MAIN>";
           else
             FOS << "<redacted function " << f << ">";