2db6b34ea introduces circular dependency on llvm::ArrayRef. By inspecting commit history,
it appears that we have some issue using deduction guide on std::array.
Why don't we try std::array with explicit template arguments?
Details
Diff Detail
Event Timeline
Pipeline failed due to missing include header llvm/ADT/Hashing.h
In file included from /var/lib/buildkite-agent/builds/llvm-project/clang-tools-extra/clangd/Config.cpp:9: /var/lib/buildkite-agent/builds/llvm-project/clang-tools-extra/clangd/Config.h:158:18: error: no member named 'hash_combine' in namespace 'llvm' return llvm::hash_combine(Val.Kind, Val.Location, Val.MountPoint);
This header was included by ArrayRef.h which is included by STLExtras.h before.
#include "llvm/ADT/Hashing.h"
I don't think it's a good idea to dive into every TU and revise this include dependency. Let's add this to STLExtras.h directly.
Add header llvm/ADT/Hashing.h, which is included by ArrayRef.h before. This header may be dependent by some TUs indirectly.
Can anyone else help me to commit this PR? I mean we should land this patch ASAP, as many of PRs are now depending on llvm::ArrayRef without including ADT/ArrayRef.h but ADT/STLExtras.h, which would make it extremely harder to resolve this circular dependency later.
Patch D139553 is a good example to demonstrate this.
/repo/llvm-project/llvm/include/llvm/MC/SubtargetFeature.h:192:32: error: no template named 'ArrayRef' void addFeaturesVector(const ArrayRef<std::string> OtherFeatures); ^ /repo/llvm-project/llvm/lib/MC/SubtargetFeature.cpp:45:25: error: out-of-line definition of 'addFeaturesVector' does not match any declaration in 'llvm::SubtargetFeatures' void SubtargetFeatures::addFeaturesVector( ^~~~~~~~~~~~~~~~~ 2 errors generated.
I have updated this patch to fix this new issue.
@eklepilkina, please note that this patch doesn't have functional changes but add a header.
Also ping @JDevlieghere again.
Sorry for my silly mistake, I don't know that Phabricator drops the author info. Please use zyounan<zyn7109@gmail.com> for the commit. Thank you again for your time.