This is an archive of the discontinued LLVM Phabricator instance.

Make SymbolTable::findAll to return only defined symbols.
ClosedPublic

Authored by ruiu on Jun 28 2016, 8:32 PM.

Details

Summary

We allowed the function to return a vector that contains nullptrs
which is weird. This change makes the function to return only
defined symbols.

Diff Detail

Event Timeline

ruiu updated this revision to Diff 62172.Jun 28 2016, 8:32 PM
ruiu retitled this revision from to Make SymbolTable::findAll to return only defined symbols..
ruiu updated this object.
ruiu added a reviewer: davide.
ruiu added a subscriber: llvm-commits.
davide edited edge metadata.Jun 28 2016, 8:34 PM

I haven't a strong preference, but if you really like this one better, go for it.

ruiu added a comment.Jun 28 2016, 8:37 PM

I think that the previous version has a hidden bug that if a returned vector contains two symbols {A, B} where A is undefined and B is undefined, it would report an warning that "version script assignment of foo to B failed: symbol not defined".

davide accepted this revision.Jun 28 2016, 8:39 PM
davide edited edge metadata.

OK, lgtm.

This revision is now accepted and ready to land.Jun 28 2016, 8:39 PM

If you can find a way to trigger the bug, and add a testcase, that will be great.

This revision was automatically updated to reflect the committed changes.