[lld] r305610 - Remove /dumppdb option from LLD.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 16 16:41:44 PDT 2017
Author: zturner
Date: Fri Jun 16 18:41:44 2017
New Revision: 305610
URL: http://llvm.org/viewvc/llvm-project?rev=305610&view=rev
Log:
Remove /dumppdb option from LLD.
This option is no longer needed.
Differential Revision: https://reviews.llvm.org/D34302
Modified:
lld/trunk/COFF/Config.h
lld/trunk/COFF/Driver.cpp
lld/trunk/COFF/Options.td
lld/trunk/COFF/PDB.cpp
Modified: lld/trunk/COFF/Config.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Config.h?rev=305610&r1=305609&r2=305610&view=diff
==============================================================================
--- lld/trunk/COFF/Config.h (original)
+++ lld/trunk/COFF/Config.h Fri Jun 16 18:41:44 2017
@@ -161,9 +161,6 @@ struct Configuration {
bool LargeAddressAware = false;
bool HighEntropyVA = false;
bool AppContainer = false;
-
- // This is for debugging.
- bool DumpPdb = false;
};
extern Configuration *Config;
Modified: lld/trunk/COFF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Driver.cpp?rev=305610&r1=305609&r2=305610&view=diff
==============================================================================
--- lld/trunk/COFF/Driver.cpp (original)
+++ lld/trunk/COFF/Driver.cpp Fri Jun 16 18:41:44 2017
@@ -905,7 +905,6 @@ void LinkerDriver::link(ArrayRef<const c
Config->TerminalServerAware = false;
if (Args.hasArg(OPT_nosymtab))
Config->WriteSymtab = false;
- Config->DumpPdb = Args.hasArg(OPT_dumppdb);
Config->MapFile = getMapFile(Args);
Modified: lld/trunk/COFF/Options.td
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Options.td?rev=305610&r1=305609&r2=305610&view=diff
==============================================================================
--- lld/trunk/COFF/Options.td (original)
+++ lld/trunk/COFF/Options.td Fri Jun 16 18:41:44 2017
@@ -102,7 +102,6 @@ def nosymtab : F<"nosymtab">;
def msvclto : F<"msvclto">;
// Flags for debugging
-def dumppdb : Joined<["/", "-"], "dumppdb">;
def lldmap : F<"lldmap">;
def lldmap_file : Joined<["/", "-"], "lldmap:">;
Modified: lld/trunk/COFF/PDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/PDB.cpp?rev=305610&r1=305609&r2=305610&view=diff
==============================================================================
--- lld/trunk/COFF/PDB.cpp (original)
+++ lld/trunk/COFF/PDB.cpp Fri Jun 16 18:41:44 2017
@@ -17,7 +17,6 @@
#include "llvm/DebugInfo/CodeView/CVTypeVisitor.h"
#include "llvm/DebugInfo/CodeView/LazyRandomTypeCollection.h"
#include "llvm/DebugInfo/CodeView/SymbolDumper.h"
-#include "llvm/DebugInfo/CodeView/TypeDatabase.h"
#include "llvm/DebugInfo/CodeView/TypeDumpVisitor.h"
#include "llvm/DebugInfo/CodeView/TypeStreamMerger.h"
#include "llvm/DebugInfo/CodeView/TypeTableBuilder.h"
@@ -144,56 +143,10 @@ static void addObjectsToPDB(SymbolTable
addTypeInfo(Builder.getIpiBuilder(), IDTable);
}
-static void dumpDebugT(ScopedPrinter &W, ObjectFile *File) {
- ListScope LS(W, "DebugT");
- ArrayRef<uint8_t> Data = getDebugSection(File, ".debug$T");
- if (Data.empty())
- return;
-
- LazyRandomTypeCollection Types(Data, 100);
- TypeDumpVisitor TDV(Types, &W, false);
- // Use a default implementation that does not follow type servers and instead
- // just dumps the contents of the TypeServer2 record.
- if (auto EC = codeview::visitTypeStream(Types, TDV))
- fatal(EC, "CVTypeDumper::dump failed");
-}
-
-static void dumpDebugS(ScopedPrinter &W, ObjectFile *File) {
- ListScope LS(W, "DebugS");
- ArrayRef<uint8_t> Data = getDebugSection(File, ".debug$S");
- if (Data.empty())
- return;
-
- BinaryByteStream Stream(Data, llvm::support::little);
- CVSymbolArray Symbols;
- BinaryStreamReader Reader(Stream);
- if (auto EC = Reader.readArray(Symbols, Reader.getLength()))
- fatal(EC, "StreamReader.readArray<CVSymbolArray> failed");
-
- TypeDatabase TDB(0);
- CVSymbolDumper SymbolDumper(W, TDB, CodeViewContainer::ObjectFile, nullptr,
- false);
- if (auto EC = SymbolDumper.dump(Symbols))
- fatal(EC, "CVSymbolDumper::dump failed");
-}
-
-// Dump CodeView debug info. This is for debugging.
-static void dumpCodeView(SymbolTable *Symtab) {
- ScopedPrinter W(outs());
-
- for (ObjectFile *File : Symtab->ObjectFiles) {
- dumpDebugT(W, File);
- dumpDebugS(W, File);
- }
-}
-
// Creates a PDB file.
void coff::createPDB(StringRef Path, SymbolTable *Symtab,
ArrayRef<uint8_t> SectionTable,
const llvm::codeview::DebugInfo *DI) {
- if (Config->DumpPdb)
- dumpCodeView(Symtab);
-
BumpPtrAllocator Alloc;
pdb::PDBFileBuilder Builder(Alloc);
ExitOnErr(Builder.initialize(4096)); // 4096 is blocksize
More information about the llvm-commits
mailing list