[LLD] [MinGW] Pass the --demangle and --no-demangle options to the COFF linker

Differential Revision: https://reviews.llvm.org/D93950
diff --git a/lld/MinGW/Driver.cpp b/lld/MinGW/Driver.cpp
index fae5cb7..f8eb4e7 100644
--- a/lld/MinGW/Driver.cpp
+++ b/lld/MinGW/Driver.cpp
@@ -320,6 +320,11 @@
   else
     add("-opt:noref");
 
+  if (args.hasFlag(OPT_demangle, OPT_no_demangle, true))
+    add("-demangle");
+  else
+    add("-demangle:no");
+
   if (args.hasFlag(OPT_enable_auto_import, OPT_disable_auto_import, true))
     add("-auto-import");
   else