[all-commits] [llvm/llvm-project] e9211e: Remove dependency from raw_ostream on <chrono>

serge-sans-paille via All-commits all-commits at lists.llvm.org
Fri Jan 21 06:18:06 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e9211e03937751ab75bbb34e38acc330b85fb0d8
      https://github.com/llvm/llvm-project/commit/e9211e03937751ab75bbb34e38acc330b85fb0d8
  Author: serge-sans-paille <sguelton at redhat.com>
  Date:   2022-01-21 (Fri, 21 Jan 2022)

  Changed paths:
    M lldb/tools/lldb-vscode/FifoFiles.h
    M llvm/include/llvm/Debuginfod/Debuginfod.h
    M llvm/include/llvm/Debuginfod/HTTPClient.h
    A llvm/include/llvm/Support/Duration.h
    M llvm/include/llvm/Support/raw_ostream.h
    M llvm/lib/Support/raw_ostream.cpp
    M llvm/unittests/Support/Path.cpp

  Log Message:
  -----------
  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




More information about the All-commits mailing list