[PATCH] D54627: [ELF] - Make SymbolTable::addDefined return Defined.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 27 03:01:52 PST 2018
grimar marked an inline comment as done.
grimar added inline comments.
================
Comment at: lld/trunk/ELF/SymbolTable.cpp:477
Value);
- return S;
+ return cast<Defined>(S);
}
----------------
ruiu wrote:
> If `Cmp == 0`, doesn't this `cast` fail with an assertion failure because `S` is not guaranteed to be a Defined symbol?
Note that if `Cmp == 0` we call the `reportDuplicate` which do the `cast<Defined>` inside:
https://github.com/llvm-mirror/lld/blob/master/ELF/SymbolTable.cpp#L427
I think in all cases `S` here is a `Defined`.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54627/new/
https://reviews.llvm.org/D54627
More information about the llvm-commits
mailing list