[PATCH] D69650: [ELF] Suggest extern "C" when the definition is mangled while an undefined reference is not

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 8 02:37:13 PST 2019


ruiu accepted this revision.
ruiu added a comment.

LGTM



================
Comment at: lld/ELF/Relocations.cpp:709
+    return false;
+  bool ret = ref == buf;
+  free(buf);
----------------
nit: I'd add parentheses to the right-hand side.


================
Comment at: lld/ELF/Relocations.cpp:805-806
+    if (s) {
+      pre_hint = " to declare ";
+      post_hint = " as extern \"C\"?";
+      return s;
----------------
preHint and postHint


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69650





More information about the llvm-commits mailing list