This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] Include system headers before optionally defining HWCAP macros
ClosedPublic

Authored by dim on Apr 20 2023, 10:44 AM.

Details

Summary

In https://reviews.llvm.org/D141285 the optional definitions of HWCAP
macros were moved to before their usage. However, they were also moved
to before the inclusion of system headers which can optionally define
them. If any of those system headers then actually defined any of the
HWCAP macros, it would result in a redefinition error.

Move the system header includes to just before the optional definitions,
to avoid this problem.

Diff Detail

Event Timeline

dim created this revision.Apr 20 2023, 10:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 20 2023, 10:44 AM
dim requested review of this revision.Apr 20 2023, 10:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 20 2023, 10:44 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
ilinpv accepted this revision.Apr 20 2023, 10:55 AM

LGTM, thanks!

This revision is now accepted and ready to land.Apr 20 2023, 10:55 AM