[PATCH] [ARM] Fix ARM triple parsing.
Renato Golin
renato.golin at linaro.org
Sun Nov 2 03:30:27 PST 2014
Hi Gabor,
The idea is good, but I think we need a better implementation... Something that would be valid for other archs too.
As I see it, some arch strings are static (ex. "r600" or "hexagon"), and for them, a StringSwitch is the best way.
Others, like ARM ("armv*") and Intel ("i*", "x86*"), MIPS ("mips*") would better be separate on their own static inline functions returning the Triple::ArchType, not boolean. Your new function is good, but instead of boolean, change it to Triple::ArchType, and implement it for the others that have the same pattern.
cheers,
--renato
http://reviews.llvm.org/D6058
More information about the llvm-commits
mailing list