[PATCH] D64136: [ELF] resolveUndefined: ignore undefined symbols in SharedFile for Undefined and SharedSymbol

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 4 03:25:47 PDT 2019


MaskRay marked an inline comment as done.
MaskRay added inline comments.


================
Comment at: ELF/Symbols.cpp:485
+  // Undefined symbols in a SharedFile do not change the binding.
+  if (isa_and_nonnull<SharedFile>(Other.File))
+    return;
----------------
ruiu wrote:
> Little off-topic, but I'd probably just use dyn_cast instead of this new predicate so that code readers don't have to memorize one more predicate.
Do you mean `dyn_cast_or_null`?

`dyn_cast` cannot be used because it would assert on a nullptr.


Repository:
  rLLD LLVM Linker

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64136/new/

https://reviews.llvm.org/D64136





More information about the llvm-commits mailing list