diff options
Diffstat (limited to 'llvm/tools')
-rw-r--r-- | llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp | 12 | ||||
-rw-r--r-- | llvm/tools/llvm-readobj/COFFDumper.cpp | 5 |
2 files changed, 11 insertions, 6 deletions
diff --git a/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp b/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp index d3c6a799ac4..d9004f78a0e 100644 --- a/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp +++ b/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp @@ -36,6 +36,7 @@ #include "llvm/DebugInfo/CodeView/ModuleDebugInlineeLinesFragment.h" #include "llvm/DebugInfo/CodeView/ModuleDebugLineFragment.h" #include "llvm/DebugInfo/CodeView/TypeStreamMerger.h" +#include "llvm/DebugInfo/CodeView/TypeTableBuilder.h" #include "llvm/DebugInfo/MSF/MSFBuilder.h" #include "llvm/DebugInfo/PDB/GenericError.h" #include "llvm/DebugInfo/PDB/IPDBEnumChildren.h" @@ -851,15 +852,18 @@ static void mergePdbs() { for (const auto &Path : opts::merge::InputFilenames) { std::unique_ptr<IPDBSession> Session; auto &File = loadPDB(Path, Session); + SmallVector<TypeIndex, 128> SourceToDest; if (File.hasPDBTpiStream()) { + SourceToDest.clear(); auto &Tpi = ExitOnErr(File.getPDBTpiStream()); - ExitOnErr(codeview::mergeTypeStreams(MergedIpi, MergedTpi, nullptr, - Tpi.typeArray())); + ExitOnErr(codeview::mergeTypeStreams(MergedIpi, MergedTpi, SourceToDest, + nullptr, Tpi.typeArray())); } if (File.hasPDBIpiStream()) { + SourceToDest.clear(); auto &Ipi = ExitOnErr(File.getPDBIpiStream()); - ExitOnErr(codeview::mergeTypeStreams(MergedIpi, MergedTpi, nullptr, - Ipi.typeArray())); + ExitOnErr(codeview::mergeTypeStreams(MergedIpi, MergedTpi, SourceToDest, + nullptr, Ipi.typeArray())); } } diff --git a/llvm/tools/llvm-readobj/COFFDumper.cpp b/llvm/tools/llvm-readobj/COFFDumper.cpp index 0cf964a49cd..78bfa558e4a 100644 --- a/llvm/tools/llvm-readobj/COFFDumper.cpp +++ b/llvm/tools/llvm-readobj/COFFDumper.cpp @@ -1072,8 +1072,9 @@ void COFFDumper::mergeCodeViewTypes(TypeTableBuilder &CVIDs, W.flush(); error(object_error::parse_failed); } - - if (auto EC = mergeTypeStreams(CVIDs, CVTypes, nullptr, Types)) + SmallVector<TypeIndex, 128> SourceToDest; + if (auto EC = + mergeTypeStreams(CVIDs, CVTypes, SourceToDest, nullptr, Types)) return error(std::move(EC)); } } |