[PATCH] D62434: [lld-link] diagnose undefined symbols before LTO when possible

Bob Haarman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 25 08:55:09 PDT 2019


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


================
Comment at: lld/COFF/SymbolTable.cpp:143
+  llvm_unreachable("unsupported file type passed to getSymbolLocations");
+  return {};
+}
----------------
ruiu wrote:
> I don't think you need this `return` after an unreachable statement. I believe all C++ compilers that are smart enough to recognize that this function always return a value or abort. (If it would fail on a buildbot, we can add this line later.)
I grepped the LLVM codebase, and it seems that in other places, we follow llvm_unreachable() with return. I think it's safer and more consistent to leave this return in here, so unless you object I'd like to ship this as it stands.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62434





More information about the llvm-commits mailing list