[PATCH] D55220: [yaml2obj] Move redundant statements into a separate static function
Xing via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 4 02:20:48 PST 2018
Higuoxing marked an inline comment as done.
Higuoxing added inline comments.
================
Comment at: tools/yaml2obj/yaml2elf.cpp:278
unsigned SymIdx;
- if (SymN2I.lookup(S->Info, SymIdx) && !to_integer(S->Info, SymIdx)) {
- WithColor::error() << "Unknown symbol referenced: '" << S->Info
- << "' at YAML section '" << S->Name << "'.\n";
+ if (!checkSectionIndex(SymN2I, S->Name, S->Info, SymIdx))
return false;
----------------
Higuoxing wrote:
> jhenderson wrote:
> > jhenderson wrote:
> > > This isn't a section index lookup. It's a symbol lookup. Note that the message is different.
> > By the way, were there no test failures because of this? If there were none, I'd suggest adding a test for this particular case, again in a separate change.
> Sure, I'll add one.
I noticed this problem, because they are all of type `NameToIdxMap`.
I did not noticed the error hints are different, I'll fix them, thanks for your reviewing
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55220/new/
https://reviews.llvm.org/D55220
More information about the llvm-commits
mailing list