[PATCH] D86406: Speedup llvm-dwarfdump 3.9x
Joerg Sonnenberger via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 25 10:18:29 PDT 2020
joerg added inline comments.
================
Comment at: llvm/include/llvm/Support/raw_ostream.h:298
/// The result is unaffected by calls to enable_color().
- virtual bool has_colors() const { return is_displayed(); }
+ virtual bool has_colors() { return is_displayed(); }
----------------
I'd keep the original const in the interface contract and mark HasColors as mutable instead. It's an implementation detail that the field is set lazily and the property itself should be invariant.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86406/new/
https://reviews.llvm.org/D86406
More information about the llvm-commits
mailing list