This is an archive of the discontinued LLVM Phabricator instance.

Define toString() as a generic function to get a string for error message.
ClosedPublic

Authored by ruiu on Nov 22 2016, 5:44 PM.

Details

Summary

We have different functions to stringize objects to construct
error messages. For InputFile, we have getFilename, and for
InputSection, we have getName. You had to memorize them.

I think this is the case where the function overloading comes in handy.

This patch defines toString() functions that are overloaded for all these
types, so that you just call it in error().

Diff Detail

Repository
rL LLVM

Event Timeline

ruiu updated this revision to Diff 79011.Nov 22 2016, 5:44 PM
ruiu retitled this revision from to Define toString() as a generic function to get a string for error message..
ruiu updated this object.
ruiu added a reviewer: evgeny777.
ruiu added a subscriber: llvm-commits.
evgeny777 accepted this revision.Nov 23 2016, 8:49 AM
evgeny777 edited edge metadata.

Great! LGTM

This revision is now accepted and ready to land.Nov 23 2016, 8:49 AM
This revision was automatically updated to reflect the committed changes.