[PATCH] D41606: [COFF] support /ignore:4217

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 27 22:47:29 PST 2017


ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: lld/COFF/Driver.cpp:799-800
+  // Handle /ignore
+  for (auto *Arg : Args.filtered(OPT_ignore)) {
+    if (StringRef(Arg->getValue()) == "4217") {
+      Config->WarnLocallyDefinedImported = false;
----------------
nit: remove {}


================
Comment at: lld/COFF/SymbolTable.cpp:120
       errorOrWarn("<root>: undefined symbol: " + B->getName());
-    if (Symbol *Imp = LocalImports.lookup(B))
-      warn("<root>: locally defined symbol imported: " + Imp->getName() +
-           " (defined in " + toString(Imp->getFile()) + ")");
+    if (Config->WarnLocallyDefinedImported) {
+      if (Symbol *Imp = LocalImports.lookup(B))
----------------
remove {}


================
Comment at: lld/COFF/SymbolTable.cpp:133
         errorOrWarn(toString(File) + ": undefined symbol: " + Sym->getName());
-      if (Symbol *Imp = LocalImports.lookup(Sym))
-        warn(toString(File) + ": locally defined symbol imported: " +
-             Imp->getName() + " (defined in " + toString(Imp->getFile()) + ")");
+      if (Config->WarnLocallyDefinedImported) {
+        if (Symbol *Imp = LocalImports.lookup(Sym))
----------------
ditto


https://reviews.llvm.org/D41606





More information about the llvm-commits mailing list