[PATCH] D41310: [COFF] Remove /nopdb option
Shoaib Meenai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 15 13:40:59 PST 2017
smeenai created this revision.
smeenai added reviewers: ruiu, pcc.
Herald added subscribers: JDevlieghere, aprantl.
/nopdb would only have an effect if /debug was specified, and the
combination of /debug and /nopdb was previously used to support DWARF
debugging. LLD now has /debug:dwarf for this purpose, so /nopdb is
redundant and can be removed.
I think it also makes sense for the combination of /debug and /debug:dwarf
to be an error. I can make that change in a follow-up if others agree.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D41310
Files:
COFF/Driver.cpp
COFF/Options.td
test/COFF/debug-dwarf.test
test/COFF/nopdb.test
Index: test/COFF/nopdb.test
===================================================================
--- test/COFF/nopdb.test
+++ /dev/null
@@ -1,14 +0,0 @@
-# Check that /debug creates %t.pdb.
-# RUN: rm -f %t.pdb
-# RUN: lld-link /debug /entry:main /out:%t.exe %p/Inputs/ret42.obj
-# RUN: ls %t.pdb
-
-# Check that /debug /nopdb does not create %t.pdb.
-# RUN: rm -f %t.pdb
-# RUN: lld-link /debug /nopdb /entry:main /out:%t.exe %p/Inputs/ret42.obj
-# RUN: not ls %t.pdb
-
-# Check that /debug /nopdb /pdb:%t.pdb does not create %t.pdb.
-# RUN: rm -f %t.pdb
-# RUN: lld-link /debug /nopdb /pdb:%t.pdb /entry:main /out:%t.exe %p/Inputs/ret42.obj
-# RUN: not ls %t.pdb
Index: test/COFF/debug-dwarf.test
===================================================================
--- /dev/null
+++ test/COFF/debug-dwarf.test
@@ -0,0 +1,19 @@
+# Check that /debug creates %t.pdb.
+# RUN: rm -f %t.pdb
+# RUN: lld-link /debug /entry:main /out:%t.exe %p/Inputs/ret42.obj
+# RUN: ls %t.pdb
+
+# Check that /debug:dwarf does not create %t.pdb.
+# RUN: rm -f %t.pdb
+# RUN: lld-link /debug:dwarf /entry:main /out:%t.exe %p/Inputs/ret42.obj
+# RUN: not ls %t.pdb
+
+# Check that /debug:dwarf /debug does not create %t.pdb.
+# RUN: rm -f %t.pdb
+# RUN: lld-link /debug:dwarf /debug /entry:main /out:%t.exe %p/Inputs/ret42.obj
+# RUN: not ls %t.pdb
+
+# Check that /debug:dwarf /pdb:%t.pdb does not create %t.pdb.
+# RUN: rm -f %t.pdb
+# RUN: lld-link /debug:dwarf /pdb:%t.pdb /entry:main /out:%t.exe %p/Inputs/ret42.obj
+# RUN: not ls %t.pdb
Index: COFF/Options.td
===================================================================
--- COFF/Options.td
+++ COFF/Options.td
@@ -120,7 +120,6 @@
def debug_ghash : F<"debug:ghash">;
def debug_dwarf : F<"debug:dwarf">;
def export_all_symbols : F<"export-all-symbols">;
-def nopdb : F<"nopdb">, HelpText<"Disable PDB generation for DWARF users">;
def lldmingw : F<"lldmingw">;
def msvclto : F<"msvclto">;
def output_def : Joined<["/", "-"], "output-def:">;
Index: COFF/Driver.cpp
===================================================================
--- COFF/Driver.cpp
+++ COFF/Driver.cpp
@@ -1151,8 +1151,8 @@
sys::path::replace_extension(Config->PDBPath, ".pdb");
}
- // Disable PDB generation if the user requested it.
- if (Args.hasArg(OPT_nopdb) || Args.hasArg(OPT_debug_dwarf))
+ // Disable PDB generation if the user requested DWARF.
+ if (Args.hasArg(OPT_debug_dwarf))
Config->PDBPath = "";
// Set default image base if /base is not given.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41310.127190.patch
Type: text/x-patch
Size: 2500 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171215/3568ec85/attachment.bin>
More information about the llvm-commits
mailing list