[PATCH] D117333: [dsymutil] Don't print swift interface timestamp warning if we have no timestamp
Jonas Devlieghere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 19 21:52:15 PST 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG10ea7316995d: [dsymutil] Don't print timestamp warning if we have no timestamp (authored by JDevlieghere).
Changed prior to commit:
https://reviews.llvm.org/D117333?vs=400052&id=401509#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117333/new/
https://reviews.llvm.org/D117333
Files:
llvm/test/tools/dsymutil/X86/swift-ast-x86_64.test
llvm/tools/dsymutil/DwarfLinkerForBinary.cpp
Index: llvm/tools/dsymutil/DwarfLinkerForBinary.cpp
===================================================================
--- llvm/tools/dsymutil/DwarfLinkerForBinary.cpp
+++ llvm/tools/dsymutil/DwarfLinkerForBinary.cpp
@@ -414,7 +414,8 @@
auto ModificationTime =
std::chrono::time_point_cast<std::chrono::seconds>(
Stat.getLastModificationTime());
- if (ModificationTime != Obj->getTimestamp()) {
+ if (Obj->getTimestamp() != sys::TimePoint<>() &&
+ ModificationTime != Obj->getTimestamp()) {
// Not using the helper here as we can easily stream TimePoint<>.
WithColor::warning()
<< File << ": timestamp mismatch between swift interface file ("
Index: llvm/test/tools/dsymutil/X86/swift-ast-x86_64.test
===================================================================
--- llvm/test/tools/dsymutil/X86/swift-ast-x86_64.test
+++ llvm/test/tools/dsymutil/X86/swift-ast-x86_64.test
@@ -1,4 +1,5 @@
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
+RUN: dsymutil -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -o %T/swift-ast.dSYM -verbose | FileCheck %s --check-prefix=DSYMUTIL
RUN: llvm-readobj --sections --section-data %T/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=READOBJ
RUN: llvm-dwarfdump --show-section-sizes %T/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=DWARFDUMP
@@ -11,6 +12,7 @@
DSYMUTIL: filename:{{.*}}swift-ast.swiftmodule
DSYMUTIL-NOT: The file was not recognized as a valid object file
+DSYMUTIL-NOT: timestamp mismatch
DSYMUTIL: DEBUG MAP OBJECT:{{.*}}swift-ast.swiftmodule
READOBJ: Name:{{.*}}__swift_ast
@@ -19,8 +21,5 @@
DWARFDUMP: __swift_ast
-RUN: dsymutil -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -no-output -verbose 2>&1 | FileCheck %s --check-prefix=TIMESTAMP
-TIMESTAMP: warning: {{.*}}/swift-ast.swiftmodule: timestamp mismatch between swift interface file ({{.*}}) and debug map ({{.*}})
-
RUN: dsymutil -s %T/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=NAST
NAST-NOT: N_AST
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117333.401509.patch
Type: text/x-patch
Size: 2324 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220120/e8b3e809/attachment.bin>
More information about the llvm-commits
mailing list