[PATCH] D57115: [llvm] Remove dependency on <algorithm> [NFC]

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 23 13:41:22 PST 2019


rupprecht requested changes to this revision.
rupprecht added a comment.
This revision now requires changes to proceed.

I just took a look at the file Herald added me for (`tools/llvm-objcopy/llvm-objcopy.cpp`), and it uses `std::copy` from `<algorithm>`. I imagine many of the files in this patch are similar.

Arbitrarily removing includes like this just makes things fragile -- things will start breaking when an include is removed from a completely unrelated header. An iwyu-based approach would be better for this kind of patch -- which still requires taking care as it could create some breakages, but in a much less fragile way.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57115/new/

https://reviews.llvm.org/D57115





More information about the llvm-commits mailing list