[PATCH] D62725: [ELF] Replace a dead test in getSymVA() with assert()
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 31 03:10:14 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL362218: [ELF] Replace a dead test in getSymVA() with assert() (authored by MaskRay, committed by ).
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62725/new/
https://reviews.llvm.org/D62725
Files:
lld/trunk/ELF/Symbols.cpp
Index: lld/trunk/ELF/Symbols.cpp
===================================================================
--- lld/trunk/ELF/Symbols.cpp
+++ lld/trunk/ELF/Symbols.cpp
@@ -47,17 +47,11 @@
auto &D = cast<Defined>(Sym);
SectionBase *IS = D.Section;
- // According to the ELF spec reference to a local symbol from outside
- // the group are not allowed. Unfortunately .eh_frame breaks that rule
- // and must be treated specially. For now we just replace the symbol with
- // 0.
- if (IS == &InputSection::Discarded)
- return 0;
-
// This is an absolute symbol.
if (!IS)
return D.Value;
+ assert(IS != &InputSection::Discarded);
IS = IS->Repl;
uint64_t Offset = D.Value;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62725.202406.patch
Type: text/x-patch
Size: 727 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190531/a04a6a68/attachment.bin>
More information about the llvm-commits
mailing list