This is an archive of the discontinued LLVM Phabricator instance.

[Sanitizer][RISCV] Fix redefinition of REG_SP
ClosedPublic

Authored by luismarques on Nov 6 2020, 6:11 AM.

Details

Summary

The include header sys/ucontext.h already defines REG_SP as 2, causing redefinition warnings during compilation. This patch fixes that issue.
(We also can't just use the numerical definition provided by the header, as REG_SP is used in this file this refers to a struct field.)

Diff Detail

Event Timeline

luismarques created this revision.Nov 6 2020, 6:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 6 2020, 6:11 AM
Herald added subscribers: Restricted Project, NickHung, evandro and 9 others. · View Herald Transcript
luismarques requested review of this revision.Nov 6 2020, 6:11 AM
This revision is now accepted and ready to land.Nov 7 2020, 3:40 AM
This revision was automatically updated to reflect the committed changes.