[lld] r303577 - Implement various flavors of type merging.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Mon May 22 14:07:44 PDT 2017
Author: zturner
Date: Mon May 22 16:07:43 2017
New Revision: 303577
URL: http://llvm.org/viewvc/llvm-project?rev=303577&view=rev
Log:
Implement various flavors of type merging.
Previous algotirhm assumed that types and ids are in a single
unified stream. For inputs that come from object files, this
is the case. But if the input is already a PDB, or is the result
of a previous merge, then the types and ids will already have
been split up, in which case we need an algorithm that can
accept operate on independent streams of types and ids that
refer across stream boundaries to each other.
Differential Revision: https://reviews.llvm.org/D33417
Modified:
lld/trunk/COFF/PDB.cpp
Modified: lld/trunk/COFF/PDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/PDB.cpp?rev=303577&r1=303576&r2=303577&view=diff
==============================================================================
--- lld/trunk/COFF/PDB.cpp (original)
+++ lld/trunk/COFF/PDB.cpp Mon May 22 16:07:43 2017
@@ -117,8 +117,9 @@ static void mergeDebugT(SymbolTable *Sym
Handler.addSearchPath(llvm::sys::path::parent_path(File->getName()));
if (auto EC = Reader.readArray(Types, Reader.getLength()))
fatal(EC, "Reader::readArray failed");
- if (auto Err = codeview::mergeTypeStreams(IDTable, TypeTable, SourceToDest,
- &Handler, Types))
+ codeview::LazyRandomTypeCollection TypesAndIds(Types, 100);
+ if (auto Err = codeview::mergeTypeAndIdRecords(
+ IDTable, TypeTable, SourceToDest, &Handler, TypesAndIds))
fatal(Err, "codeview::mergeTypeStreams failed");
}
More information about the llvm-commits
mailing list