diff options
Diffstat (limited to 'llvm/tools/dsymutil/MachODebugMapParser.cpp')
-rw-r--r-- | llvm/tools/dsymutil/MachODebugMapParser.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/llvm/tools/dsymutil/MachODebugMapParser.cpp b/llvm/tools/dsymutil/MachODebugMapParser.cpp index 051c1e941ef..75ae67cd53f 100644 --- a/llvm/tools/dsymutil/MachODebugMapParser.cpp +++ b/llvm/tools/dsymutil/MachODebugMapParser.cpp @@ -65,7 +65,9 @@ private: std::unique_ptr<DebugMap> parseOneBinary(const MachOObjectFile &MainBinary, StringRef BinaryPath); - void switchToNewDebugMapObject(StringRef Filename, sys::TimeValue Timestamp); + void + switchToNewDebugMapObject(StringRef Filename, + sys::TimePoint<std::chrono::seconds> Timestamp); void resetParserState(); uint64_t getMainBinarySymbolAddress(StringRef Name); void loadMainBinarySymbols(const MachOObjectFile &MainBinary); @@ -110,8 +112,8 @@ void MachODebugMapParser::resetParserState() { /// Create a new DebugMapObject. This function resets the state of the /// parser that was referring to the last object file and sets /// everything up to add symbols to the new one. -void MachODebugMapParser::switchToNewDebugMapObject(StringRef Filename, - sys::TimeValue Timestamp) { +void MachODebugMapParser::switchToNewDebugMapObject( + StringRef Filename, sys::TimePoint<std::chrono::seconds> Timestamp) { resetParserState(); SmallString<80> Path(PathPrefix); @@ -343,11 +345,8 @@ void MachODebugMapParser::handleStabSymbolTableEntry(uint32_t StringIndex, const char *Name = &MainBinaryStrings.data()[StringIndex]; // An N_OSO entry represents the start of a new object file description. - if (Type == MachO::N_OSO) { - sys::TimeValue Timestamp; - Timestamp.fromEpochTime(Value); - return switchToNewDebugMapObject(Name, Timestamp); - } + if (Type == MachO::N_OSO) + return switchToNewDebugMapObject(Name, sys::toTimePoint(Value)); // If the last N_OSO object file wasn't found, // CurrentDebugMapObject will be null. Do not update anything |