This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Add includes to PointerLikeTypeTraits where needed.
ClosedPublic

Authored by herhut on Mar 2 2020, 2:45 AM.

Details

Summary

This is to ensure that the template declaration is seen before
any template specialization.

Diff Detail

Unit TestsFailed

Event Timeline

herhut created this revision.Mar 2 2020, 2:45 AM
ftynse added a subscriber: ftynse.Mar 2 2020, 3:01 AM

Should we just put it in mlir/Support/LLVM.h and rely on transitivity in most cases?

An alternative would be to forward declare the template <typename T> struct PointerLikeTypeTraits everywhere.

herhut added a comment.Mar 2 2020, 3:08 AM

Should we just put it in mlir/Support/LLVM.h and rely on transitivity in most cases?

The transitivity in most cases is where it get complicated. I have a failure because this got included in the wrong way/order. I can put a forward declaration into LLVM.h and then include that everywhere I how have PointerLikeTypeTraits.h. Would that work better?

ftynse accepted this revision.Mar 2 2020, 4:53 AM

If this fixes the build, go ahead and let's clean up later if needed.

This revision was not accepted when it landed; it landed in state Needs Review.Mar 2 2020, 5:04 AM
This revision was automatically updated to reflect the committed changes.