[PATCH] [lld] findAbsoluteAtom asserts the atom is really existing
Simon Atanasyan
simon at atanasyan.com
Wed Feb 11 00:30:07 PST 2015
I think it is rather unusual semantics for a `find` function to check its result inside itself. It is necessary to have a function which really find an atom by its name and allows caller to check the atom existence. For example MIPS object files usually define `_gp` symbol but this symbol is not mandatory. If we need a function returns an absolute atom by its name when we sure that the atom exists we can introduce a new function `getAbsoluteAtom`, put the `assert` call into it and replace `findAbsoluteAtom` by this new function where it is applicable.
REPOSITORY
rL LLVM
http://reviews.llvm.org/D7549
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list