Skip to content

Commit d43a6ae

Browse files
authored
Merge pull request #3821 from apple/🍒/austria/c167fa4a4f36+10ea7316995d
🍒/austria/c167fa4a4f36+10ea7316995d
2 parents fca75ae + 644a3a5 commit d43a6ae

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

llvm/test/tools/dsymutil/X86/swift-ast-x86_64.test

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
RUN: dsymutil -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -o %T/swift-ast.dSYM -verbose -no-swiftmodule-timestamp | FileCheck %s --check-prefix=DSYMUTIL
2+
RUN: dsymutil -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -o %T/swift-ast.dSYM -verbose | FileCheck %s --check-prefix=DSYMUTIL
23
RUN: llvm-readobj --sections --section-data %T/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=READOBJ
34
RUN: llvm-dwarfdump --show-section-sizes %T/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=DWARFDUMP
45

@@ -11,6 +12,7 @@ Compiled with:
1112

1213
DSYMUTIL: filename:{{.*}}swift-ast.swiftmodule
1314
DSYMUTIL-NOT: The file was not recognized as a valid object file
15+
DSYMUTIL-NOT: timestamp mismatch
1416
DSYMUTIL: DEBUG MAP OBJECT:{{.*}}swift-ast.swiftmodule
1517

1618
READOBJ: Name:{{.*}}__swift_ast
@@ -19,8 +21,5 @@ READOBJ-NEXT: |.|
1921

2022
DWARFDUMP: __swift_ast
2123

22-
RUN: dsymutil -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -no-output -verbose 2>&1 | FileCheck %s --check-prefix=TIMESTAMP
23-
TIMESTAMP: warning: {{.*}}/swift-ast.swiftmodule: timestamp mismatch between swift interface file ({{.*}}) and debug map ({{.*}})
24-
2524
RUN: dsymutil -s %T/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=NAST
2625
NAST-NOT: N_AST

llvm/tools/dsymutil/DwarfLinkerForBinary.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,11 +414,12 @@ bool DwarfLinkerForBinary::link(const DebugMap &Map) {
414414
auto ModificationTime =
415415
std::chrono::time_point_cast<std::chrono::seconds>(
416416
Stat.getLastModificationTime());
417-
if (ModificationTime != Obj->getTimestamp()) {
417+
if (Obj->getTimestamp() != sys::TimePoint<>() &&
418+
ModificationTime != Obj->getTimestamp()) {
418419
// Not using the helper here as we can easily stream TimePoint<>.
419420
WithColor::warning()
420421
<< File << ": timestamp mismatch between swift interface file ("
421-
<< sys::TimePoint<>(Obj->getTimestamp()) << ") and debug map ("
422+
<< sys::TimePoint<>(ModificationTime) << ") and debug map ("
422423
<< sys::TimePoint<>(Obj->getTimestamp()) << ")\n";
423424
continue;
424425
}

0 commit comments

Comments
 (0)