lld-link: Implement /swaprun: flag
authorNico Weber <nicolasweber@gmx.de>
Thu, 25 Apr 2019 14:02:26 +0000 (14:02 +0000)
committerNico Weber <nicolasweber@gmx.de>
Thu, 25 Apr 2019 14:02:26 +0000 (14:02 +0000)
commitc0838af754543a6a5aa8170e84e30b109a7c036b
treeac48fbce8454ac5aba325a27610f2969698977c0
parent48a3b545721aeb94f054b4aa044abfd9ac59bada
lld-link: Implement /swaprun: flag

r191276 added this to old LLD, but it never made it to new LLD -- except
that the flag was in Options.td, so it was silently ignored. I figured
it should be easy to implement, so I did that instead of removing the
flags from Options.td.

I then discovered that link.exe also supports comma-separated lists of
'cd' and 'net', which made the parsing code a bit annoying.

The Alias technique in Options.td is to get nice help output.

Differential Revision: https://reviews.llvm.org/D61067

llvm-svn: 359192
lld/COFF/Config.h
lld/COFF/Driver.cpp
lld/COFF/Driver.h
lld/COFF/DriverUtils.cpp
lld/COFF/Options.td
lld/COFF/Writer.cpp
lld/test/COFF/options.test