summaryrefslogtreecommitdiffstats
path: root/llvm/tools/dsymutil/MachODebugMapParser.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2016-11-09 11:43:52 +0000
committerPavel Labath <labath@google.com>2016-11-09 11:43:52 +0000
commit62d72041d4a04d93ec0ad562d5c428929cc68fdc (patch)
treee8bc85cc907c70a1e59515ffe27d79f0371e4025 /llvm/tools/dsymutil/MachODebugMapParser.cpp
parentb66261a05291254c1a78288831c5c4bbd9ba0b57 (diff)
downloadbcm5719-llvm-62d72041d4a04d93ec0ad562d5c428929cc68fdc.tar.gz
bcm5719-llvm-62d72041d4a04d93ec0ad562d5c428929cc68fdc.zip
[dsymutil] Replace TimeValue with TimePoint
Summary: All changes are pretty straight-forward. I chose to use TimePoints with second precision, as that is all that seems to be required here. Reviewers: friss, zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D25908 llvm-svn: 286358
Diffstat (limited to 'llvm/tools/dsymutil/MachODebugMapParser.cpp')
-rw-r--r--llvm/tools/dsymutil/MachODebugMapParser.cpp15
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
OpenPOWER on IntegriCloud