[PATCH] [TableGen] Sort intrinsics in reverse order for intrinsic name matcher
Justin Holewinski
justin.holewinski at gmail.com
Mon Jul 15 13:32:27 PDT 2013
================
Comment at: utils/TableGen/IntrinsicEmitter.cpp:140-143
@@ +139,6 @@
+ // "abd.def.ghi" in the overridden name matcher
+ bool operator()(unsigned i, unsigned j) {
+ const std::string &IName = Ints[i].Name;
+ const std::string &JName = Ints[j].Name;
+ return IName.compare(JName) >= 0;
+ }
----------------
Sean Silva wrote:
> Can you just use `Ints[i].Name > Ints[j].Name`? Also, the comparator needs to be a "<", but your comparator will return true for the equality case.
Sure, I just figured a bit of verbosity here helped readability.
http://llvm-reviews.chandlerc.com/D1128
More information about the llvm-commits
mailing list