[PATCH] D57115: [llvm] Remove dependency on <algorithm> [NFC]
Mandeep Singh Grang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 23 12:55:22 PST 2019
mgrang added a comment.
In D57115#1368350 <https://reviews.llvm.org/D57115#1368350>, @dblaikie wrote:
> In D57115#1368345 <https://reviews.llvm.org/D57115#1368345>, @mgrang wrote:
>
> > In D57115#1368335 <https://reviews.llvm.org/D57115#1368335>, @dblaikie wrote:
> >
> > > "mainly" used for std::sort might be true, but "only" used might be harder to prove - did you use any tooling to test that these inclusions weren't needed other than "this code still compiles" (which has the problem that the inclusion might be used, but also included indirectly from some other header - so removing it may still compile, but introduces an undesirable indirect dependency on an implementation detail of some other header)
> >
> >
> > I ran ninja check-all and did not see any failures. I haven't changed the places where algorithm is needed (like for std::fill, etc) and which introduced compile errors. I have also not touched examples, unittests and util/unittest directories.
>
>
> How did you identify these "I haven't changed the places where algorithm is needed (like for std::fill, etc)" places? By visual inspection of every file that's been touched?
No, I removed the header from all files and then put back only where the compilation failed. I agree with your comment "removing it may still compile, but introduces an undesirable indirect dependency on an implementation detail of some other header". I guess there is no foolproof way to rule out *any* possible use of the header?
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