[PATCH] D61190: [yaml2obj] - Make interface of `NameToIdxMap` class be human friendly and fix users.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 26 08:11:31 PDT 2019


grimar created this revision.
grimar added reviewers: jhenderson, ruiu.
Herald added a subscriber: jakehehrlich.

This patch fixes several issues. The most valuable is
that it inverses the values returned by `addName` and
`lookup` methods of the class mentioned so that they
now return true on success and false on failure.
I think it is very natural behavior for any normal API...

This itself I think makes the code much more clear.
Also, I changed few `lookup` calls to `get` and did a minor cleanup.


https://reviews.llvm.org/D61190

Files:
  tools/yaml2obj/yaml2elf.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61190.196854.patch
Type: text/x-patch
Size: 6102 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190426/bc85c3b0/attachment.bin>


More information about the llvm-commits mailing list