This is an archive of the discontinued LLVM Phabricator instance.

[PPC] Move argument range checks for HTM and crypto builtins to Sema
ClosedPublic

Authored by kbarton on Mar 27 2015, 1:50 PM.

Details

Summary

The argument range checks for the HTM and Crypto builtins were implemented in CGBuiltin.cpp, not in Sema. This change moves them to the appropriate location in SemaChecking.cpp. It requires the creation of a new method in the Sema class to do checks for PPC-specific builtins.

Diff Detail

Event Timeline

kbarton updated this revision to Diff 22820.Mar 27 2015, 1:50 PM
kbarton retitled this revision from to [PPC] Move argument range checks for HTM and crypto builtins to Sema.
kbarton updated this object.
kbarton edited the test plan for this revision. (Show Details)
kbarton added a subscriber: Unknown Object (MLST).
wschmidt edited edge metadata.Mar 27 2015, 2:58 PM

One stylistic comment from me; otherwise looks just fine. I'll defer to Richard as he has much more expertise here.

lib/Sema/SemaChecking.cpp
913

I don't particularly like this style of putting the code on the same line as the case (I realize it fits in with the surrounding code). It obfuscates that this code is shared by tbegin and tend, for example.

rsmith accepted this revision.Mar 27 2015, 4:39 PM
rsmith edited edge metadata.

Some tiny nits, but this looks basically fine to me too. Thanks for following up on this!

lib/Sema/SemaChecking.cpp
910–911

Parens not necessary here.

919–920

... or here.

This revision is now accepted and ready to land.Mar 27 2015, 4:39 PM
kbarton closed this revision.Mar 30 2015, 12:44 PM

Committed revision 233586.

lib/Sema/SemaChecking.cpp