I want to use this method in llvm-dwarfdump to be able to pretty
print register names in dwarf expressions. As the data I'll feed
to the method comes directly from the binary file, it might be
anything and I'd like to avoid asserting when an unknown register
number is requested.
This patch makes the method return -1 when the register isn't found.
The new behavior is the same as its inverse function getDwarfRegNum.
Note that although this method returns an 'int', each and every user I
could find stores the result in an 'unsigned' variable. Would it
make sense to change the method return type to unsigned? Should the
assert be kept and propagated to the callers? Any other suggestion
to achieve what I want?