mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
[dsymutil] Ensure we're comparing time stamps with the same precision.
After TimePoint's precision was increased in LLVM we started seeing failures because the modification times didn't match. This adds a time cast to ensure that we're comparing TimePoints with the same amount of precision. llvm-svn: 348283
This commit is contained in:
parent
8f7f9e2174
commit
3cedfc1fd4
@ -2417,15 +2417,20 @@ bool DwarfLinker::link(const DebugMap &Map) {
|
||||
warn(Err.message());
|
||||
continue;
|
||||
}
|
||||
if (!Options.NoTimestamp &&
|
||||
Stat.getLastModificationTime() !=
|
||||
sys::TimePoint<>(LinkContext.DMO.getTimestamp())) {
|
||||
// Not using the helper here as we can easily stream TimePoint<>.
|
||||
WithColor::warning()
|
||||
<< "Timestamp mismatch for " << File << ": "
|
||||
<< Stat.getLastModificationTime() << " and "
|
||||
<< sys::TimePoint<>(LinkContext.DMO.getTimestamp()) << "\n";
|
||||
continue;
|
||||
if (!Options.NoTimestamp) {
|
||||
// The modification can have sub-second precision so we need to cast
|
||||
// away the extra precision that's not present in the debug map.
|
||||
auto ModificationTime =
|
||||
std::chrono::time_point_cast<std::chrono::seconds>(
|
||||
Stat.getLastModificationTime());
|
||||
if (ModificationTime != LinkContext.DMO.getTimestamp()) {
|
||||
// Not using the helper here as we can easily stream TimePoint<>.
|
||||
WithColor::warning()
|
||||
<< "Timestamp mismatch for " << File << ": "
|
||||
<< Stat.getLastModificationTime() << " and "
|
||||
<< sys::TimePoint<>(LinkContext.DMO.getTimestamp()) << "\n";
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// Copy the module into the .swift_ast section.
|
||||
|
Loading…
Reference in New Issue
Block a user