[yaml2obj] - Make interface of `NameToIdxMap` class be human friendly and fix…

Authored by grimar on May 2 2019, 12:28 PM.


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

This patch 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.
Also, it does minor code cleanup.

Differential revision: https://reviews.llvm.org/D61190

llvm-svn: 359818