This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Reject invalid -march values
ClosedPublic

Authored by john.brawn on May 8 2015, 4:23 AM.

Details

Summary

Restructure Triple::getARMCPUForArch so that invalid values will return nullptr, while retaining the behaviour that an argument specifying no particular architecture version will give a default CPU. This will be used by clang (in D9602) to give an error on invalid -march values.

Also restructure the extraction of the architecture version from the MArch string a little to hopefully make what it's doing clearer.

Diff Detail

Repository
rL LLVM

Event Timeline

john.brawn updated this revision to Diff 25302.May 8 2015, 4:23 AM
john.brawn retitled this revision from to [ARM] Reject invalid -march values.
john.brawn updated this object.
john.brawn edited the test plan for this revision. (Show Details)
john.brawn added a reviewer: rengolin.
john.brawn set the repository for this revision to rL LLVM.
john.brawn added a subscriber: Unknown Object (MLST).
rengolin accepted this revision.May 8 2015, 4:35 AM
rengolin edited edge metadata.

Hi John,

I just happened to have a look at this method yesterday, due to D9435, and I plan on using it later on. For now, this looks a lot better than what we have.

LGTM, thanks!

This revision is now accepted and ready to land.May 8 2015, 4:35 AM
This revision was automatically updated to reflect the committed changes.