Page MenuHomePhabricator

[clang][slh] add attribute for speculative load hardening

Authored by zbrid on Nov 26 2018, 2:00 PM.



The prior diff had to be reverted because there were two tests
that failed. I updated the two tests in this diff


  • Summary from Previous Diff (Still Accurate) -----

LLVM IR already has an attribute for speculative_load_hardening. Before
this commit, when a user passed the -mspeculative-load-hardening flag to
Clang, every function would have this attribute added to it. This Clang
attribute will allow users to opt into SLH on a function by function basis.

This can be applied to functions and Objective C methods.

Diff Detail


Event Timeline

zbrid created this revision.Nov 26 2018, 2:00 PM
zbrid marked 2 inline comments as done.Nov 26 2018, 2:02 PM
zbrid added inline comments.
119 ↗(On Diff #175336)

This is the other change (also see line 5) that fixed a test which was failing the build after committing the last diff.

19 ↗(On Diff #175336)

I didn't have the clang namespace on the attributes here after changing the spelling to Clang from CXX11.

aaron.ballman accepted this revision.Nov 26 2018, 2:28 PM


Btw, if you're fixing an issue with something you had to revert due to bots, you can use your own judgement and commit the fixed code without review. However, if the fix is extensive or you want to get second opinions on the changes, then by all means get more review on it.

This revision is now accepted and ready to land.Nov 26 2018, 2:28 PM
zbrid added a comment.Nov 26 2018, 4:05 PM

Oh okay. Thanks for the info!

This revision was automatically updated to reflect the committed changes.