This is an archive of the discontinued LLVM Phabricator instance.

Don't attempt to use mpx registers on unsupported platforms
ClosedPublic

Authored by fjricci on May 1 2017, 3:08 PM.

Details

Summary

The existing cpp-level checks using PR_MPX_ENABLE_MANAGEMENT aren't sufficient,
as this isn't defined for linux kernel versions below 3.19.

Diff Detail

Repository
rL LLVM

Event Timeline

fjricci created this revision.May 1 2017, 3:08 PM
labath edited edge metadata.May 2 2017, 2:10 AM

Couldn't we just update the cpp file to do

#ifndef PR_MPX_ENABLE_MANAGEMENT
return -1;
#endif

?

Yeah, that works too, just wasn't sure which way was preferred.

fjricci updated this revision to Diff 97447.May 2 2017, 7:23 AM

Move checks into cpp files

labath accepted this revision.May 2 2017, 7:30 AM

I don't like either of the solutions too much, but this one is at least less code. :)

This revision is now accepted and ready to land.May 2 2017, 7:30 AM
This revision was automatically updated to reflect the committed changes.