[PATCH] Initial commit for the llvm-dsymutil tool.

Frederic Riss friss at apple.com
Thu Dec 11 16:34:11 PST 2014


================
Comment at: tools/dsymutil/DebugMap.cpp:42
@@ +41,3 @@
+      Entries.begin(), Entries.end(),
+      [](const Entry &LHS, const Entry &RHS) { return LHS.first < RHS.first; });
+  for (const auto &Sym : Entries) {
----------------
friss wrote:
> samsonov wrote:
> > You don't need a comparator here - all keys in StringMap are different, and std::pair<> objects are compared lexicographically by default, which is what you need.
> I didn't know pairs provided lexicographical relational operators, thanks for the tip!
Unfortunately, the default comparators require the member types to be comparable. I don't see a need to put an operator< in SymbolMapping, thus I'll leave the lambda comparator there.

http://reviews.llvm.org/D6242

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list