Remove dependency from raw_ostream on <chrono>
authorserge-sans-paille <sguelton@redhat.com>
Thu, 20 Jan 2022 11:04:42 +0000 (12:04 +0100)
committerserge-sans-paille <sguelton@redhat.com>
Fri, 21 Jan 2022 14:17:39 +0000 (15:17 +0100)
commite9211e03937751ab75bbb34e38acc330b85fb0d8
tree2a637069e9473f0ce9178f912fda74c14a9673f3
parentd5ae039ed7b84bf767d15417a3e9bf61f982257b
Remove dependency from raw_ostream on <chrono>

The tryLockFor method from raw_fd_sotreamis the sole user of that
header, and it's not referenced in the mono repo. I still chose to keep
it (may be useful for downstream user) but added a transient type that's
forward declared to hold the duration parameter.

Notable changes:

- "llvm/Support/Duration.h" must be included in order to use tryLockFor.
- "llvm/Support/raw_ostream.h" no longer includes <chrono>

This sole change has an interesting impact on the number of processed
line, as measured by:

clang++ -E  -Iinclude -I../llvm/include ../llvm/lib/Support/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -l

before: 7917500
after:  7835142

Discourse thread on the topic: https://llvm.discourse.group/t/include-what-you-use-include-cleanup/5831
lldb/tools/lldb-vscode/FifoFiles.h
llvm/include/llvm/Debuginfod/Debuginfod.h
llvm/include/llvm/Debuginfod/HTTPClient.h
llvm/include/llvm/Support/Duration.h [new file with mode: 0644]
llvm/include/llvm/Support/raw_ostream.h
llvm/lib/Support/raw_ostream.cpp
llvm/unittests/Support/Path.cpp