Antoine Pitrou via llvm-dev
2016-Mar-15 18:42 UTC
[llvm-dev] How to get list of supported CPUs and features?
Hi, I'm looking for a way to programmatically get the list of supported CPU and feature strings for a given architecture (say the current triple). As far as I've been able to find, the CLI dumping of that information (when using "-mcpu=help") is done in SubtargetFeatures::getFeatureBits (which seems a weird place to do that), but that relies on private fields (ProcDesc, ProcFeatures) tucked in the MCSubtargetInfo class, therefore I don't know how to fetch that information. Is there an easy way to do what I'm looking to do? (short of redirecting stderr and intercepting /parsing the help output...) Regards Antoine.