[ELF] Replace a dead test in getSymVA() with assert()

Symbols relative to discarded comdat sections are Undefined instead of
Defined now (after D59649 and D61583). The `== &InputSection::Discarded`
test becomes dead. I cannot find a test related to this behavior.

Reviewed By: ruiu

Differential Revision: https://reviews.llvm.org/D62725

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@362218 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/ELF/Symbols.cpp b/ELF/Symbols.cpp
index e82d1ac..8246efc 100644
--- a/ELF/Symbols.cpp
+++ b/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;