This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Use llvm::to_integer() instead of StringRef::getAsInteger().
ClosedPublic

Authored by grimar on May 15 2017, 4:32 AM.

Details

Summary

llvm::to_integer appeared in r303011.
I suggest to use to_integer everywhere in LLD instead getAsInteger() because
API of latter is confusing. It returns true on error and false otherwise what makes
reading the code incomfortable.

Diff Detail

Repository
rL LLVM

Event Timeline

grimar created this revision.May 15 2017, 4:32 AM
grimar retitled this revision from [ELF] - Use to_integer instead of getAsInteger(). to [ELF] - Use llvm::to_integer() instead of StringRef::getAsInteger()..
ruiu accepted this revision.May 15 2017, 12:55 PM

LGTM

This revision is now accepted and ready to land.May 15 2017, 12:55 PM
This revision was automatically updated to reflect the committed changes.