[PATCH] D28014: Support: Add YAML I/O support for string maps.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 4 12:21:36 PST 2017


pcc added inline comments.


================
Comment at: llvm/trunk/lib/Support/YAMLTraits.cpp:389-393
+  for (std::string &K : ValidKeys) {
+    if (Key == K)
       return true;
   }
   return false;
----------------
mehdi_amini wrote:
> majnemer wrote:
> > Isn't this: `return is_contained(ValidKeys, Key);`?
> Sweet, I didn't know about `llvm::is_contained`!
Thanks. I changed the code to use `is_contained` in r290999.


Repository:
  rL LLVM

https://reviews.llvm.org/D28014





More information about the llvm-commits mailing list