Hello,<div><br></div><div>Lots of the consumers of llvm::Triple are making very similar queries which test a range of values. These typically fall into a general classification pattern -- trying to classify various componenst of the triple according to categories, commonalities, etc.</div>
<div><br></div><div>This patch starts moving some of these predicates into the triple class itself so that the repeated code can be collapsed. I've taught X86SubTarget.h to use these predicates. I'll be combing both LLVM and Clang for more uses and fixing those as I find them if this general direction looks good to folks.</div>
<div><br></div><div>My plan is to post patches when adding predicates to llvm::Triple, but to rely on post-commit review when simply switching clients to use the new helpers and the latter is very straightforward. I do appreciate any feedback or comments on the API inside of llvm::Triple that is being built up, it seems important to get that right. The patch has a couple of FIXMEs where I have specific uncertainty about the API.</div>
<div><br></div><div>-Chandler</div>