[lld-link] Generalize handling of /debug and /debug:{none,full,fastlink,ghash,symtab}
authorWill Wilson <will@indefiant.com>
Mon, 24 Sep 2018 15:28:03 +0000 (15:28 +0000)
committerWill Wilson <will@indefiant.com>
Mon, 24 Sep 2018 15:28:03 +0000 (15:28 +0000)
commit3cb18346d776cc61da0bc5ea41e4678c1851db68
tree2ff13b1e9b1e55c1b5877b3ed564c942d723e422
parenta6398cdcfced9c9301d9daffc1e3b78f739dff6b
[lld-link] Generalize handling of /debug and /debug:{none,full,fastlink,ghash,symtab}

Implement final argument precedence if multiple /debug arguments are passed on the command-line to match expected link.exe behavior.
Support /debug:none and emit warning for /debug:fastlink with automatic fallback to /debug:full.
Emit error if last /debug:option is unknown.
Emit warning if last /debugtype:option is unknown.

https://reviews.llvm.org/D50404

llvm-svn: 342894
lld/COFF/Driver.cpp
lld/COFF/Options.td
lld/test/COFF/debug-fastlink.test [new file with mode: 0644]
lld/test/COFF/invalid-debug-type.test
lld/test/COFF/invalid-debug.test [new file with mode: 0644]
lld/test/COFF/pdb-options.test