diff options
| author | Pavel Labath <labath@google.com> | 2017-11-27 17:06:42 +0000 |
|---|---|---|
| committer | Pavel Labath <labath@google.com> | 2017-11-27 17:06:42 +0000 |
| commit | 11479d1babcfba5d4972363c38d31b13c786b8bd (patch) | |
| tree | 5fa8bcd9d9817f937bb9a6218ab7d622a852e235 /lldb/source/Commands | |
| parent | cc1328c160e8de44e6bf2d7f272d2ef9b3f1034c (diff) | |
| download | bcm5719-llvm-11479d1babcfba5d4972363c38d31b13c786b8bd.tar.gz bcm5719-llvm-11479d1babcfba5d4972363c38d31b13c786b8bd.zip | |
Remove custom TimePoint-formatting code
This was a temporary thing, until llvm has proper support for formatting
time. That time has come, so we can remove the relevant code. There
should be no change in the format of the time.
llvm-svn: 319048
Diffstat (limited to 'lldb/source/Commands')
| -rw-r--r-- | lldb/source/Commands/CommandObjectTarget.cpp | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp index 583ab2ab6ff..c83061d8de7 100644 --- a/lldb/source/Commands/CommandObjectTarget.cpp +++ b/lldb/source/Commands/CommandObjectTarget.cpp @@ -52,6 +52,7 @@ #include "lldb/Utility/Timer.h" #include "llvm/Support/FileSystem.h" +#include "llvm/Support/FormatAdapters.h" // C Includes // C++ Includes @@ -135,25 +136,6 @@ static uint32_t DumpTargetList(TargetList &target_list, return num_targets; } -// TODO: Remove this once llvm can pretty-print time points -static void DumpTimePoint(llvm::sys::TimePoint<> tp, Stream &s, uint32_t width) { -#ifndef LLDB_DISABLE_POSIX - char time_buf[32]; - time_t time = llvm::sys::toTimeT(tp); - char *time_cstr = ::ctime_r(&time, time_buf); - if (time_cstr) { - char *newline = ::strpbrk(time_cstr, "\n\r"); - if (newline) - *newline = '\0'; - if (width > 0) - s.Printf("%-*s", width, time_cstr); - else - s.PutCString(time_cstr); - } else if (width > 0) - s.Printf("%-*s", width, ""); -#endif -} - #pragma mark CommandObjectTargetCreate //------------------------------------------------------------------------- @@ -3176,7 +3158,8 @@ protected: } break; case 'm': - DumpTimePoint(module->GetModificationTime(), strm, width); + strm.Format("{0:%c}", llvm::fmt_align(module->GetModificationTime(), + llvm::AlignStyle::Left, width)); break; case 'p': |

