[PATCH] D54627: [ELF] - Make SymbolTable::addDefined return Defined.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 26 10:58:11 PST 2018


ruiu added inline comments.


================
Comment at: lld/trunk/ELF/SymbolTable.cpp:477
                     Value);
-  return S;
+  return cast<Defined>(S);
 }
----------------
If `Cmp == 0`, doesn't this `cast` fail with an assertion failure because `S` is not guaranteed to be a Defined symbol?


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