This is an archive of the discontinued LLVM Phabricator instance.

Workaround around clang 5.0 bug by including SmallVector.h in LLVM.h (PR41549)
ClosedPublic

Authored by mehdi_amini on Dec 17 2020, 3:58 PM.

Details

Summary

The forward declaration for SmallVector does not play well with clang-5.

Diff Detail

Event Timeline

mehdi_amini created this revision.Dec 17 2020, 3:58 PM
mehdi_amini requested review of this revision.Dec 17 2020, 3:58 PM
rriddle accepted this revision.Dec 17 2020, 4:00 PM
This revision is now accepted and ready to land.Dec 17 2020, 4:00 PM
mehdi_amini retitled this revision from Workaround around gcc 5.0 by including SmallVector.h in LLVM.h (PR41549) to Workaround around clang 5.0 bug by including SmallVector.h in LLVM.h (PR41549).

Update title: clang-5 is the buggy compiler this time

This revision was landed with ongoing or failed builds.Dec 17 2020, 4:01 PM
This revision was automatically updated to reflect the committed changes.

I think you also should do the same for

clang/include/clang/Basic/LLVM.h
lld/include/lld/Common/LLVM.h

Otherwise folks will this this same issue on the bots when SmallVector<T> starts being used there. (maybe change a random SmallVector<T, N> to a SmallVector<T> in each of those subprojects)