[PATCH] D120211: Remove unused includes

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 20 11:08:06 PST 2022


RKSimon added inline comments.


================
Comment at: llvm/include/llvm/MCA/HWEventListener.h:69
 
   ArrayRef<ResourceUse> UsedResources;
 };
----------------
clemenswasser wrote:
> clemenswasser wrote:
> > MaskRay wrote:
> > > ArrayRef is used
> > D120208 will forward declare ArrayRef. So this is currently blocked on it.
> Actually I think ArrayRef is already forward declared somewhere. We are however still blocked on D120208, since it will move some implementations from the header into the corresponding cpp files, which currently cause this build to fail.
We need the full def, not just the forward declaration here though as we're actually instantiating ArrayRef<ResourceUse> in HWInstructionIssuedEvent, not just passing it in an arg.

It looks like you're depending on ArrayRef.h include from one of the remaining headers (well, both actually...), which the style guide allows, but we typically don't tend to rely on that unless we only require the local use of the def because of the other header.

https://llvm.org/docs/CodingStandards.html#include-as-little-as-possible


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

https://reviews.llvm.org/D120211



More information about the llvm-commits mailing list