aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2020-07-06 16:31:56 +0200
committerRaphael Isemann <teemperor@gmail.com>2020-07-06 16:59:37 +0200
commit5814255e1a7d2e90580d6df457ddd13b1cd156cb (patch)
tree99053899c21883e4e5fd667d2de3e7b405f1f8c7 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent146dad0077b46a0fb8e158c10490c1774db5a762 (diff)
downloadllvm-5814255e1a7d2e90580d6df457ddd13b1cd156cb.zip
llvm-5814255e1a7d2e90580d6df457ddd13b1cd156cb.tar.gz
llvm-5814255e1a7d2e90580d6df457ddd13b1cd156cb.tar.bz2
[lldb] Always round down in NSDate's formatter to match NSDate's builtin format
Summary: When printing an NSDate (for example with `NSLog` or `po`) the seconds value is always rounded down. LLDB's own formatter however isn't following that behaviour which leads to situations where the formatted result is sometimes one second off. For example: ``` (lldb) p [NSDate dateWithTimeIntervalSince1970:0.1] (__NSTaggedDate *) $1 = [...] 1970-01-01 00:00:01 UTC (lldb) po [NSDate dateWithTimeIntervalSince1970:0.1] 1970-01-01 00:00:00 +0000 (lldb) p [NSDate dateWithTimeIntervalSince1970:0.6] (__NSTaggedDate *) $4 =[...] 1970-01-01 00:00:01 UTC (lldb) po [NSDate dateWithTimeIntervalSince1970:0.6] 1970-01-01 00:00:00 +0000 ``` This patch just always rounds down the seconds value we get from the NSDate object. Fixes rdar://65084800 Reviewers: mib, davide Reviewed By: mib Subscribers: JDevlieghere Differential Revision: https://reviews.llvm.org/D83221
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions