[llvm] r319862 - Fix error in llvm-pdbutil.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 5 16:26:43 PST 2017
Author: zturner
Date: Tue Dec 5 16:26:43 2017
New Revision: 319862
URL: http://llvm.org/viewvc/llvm-project?rev=319862&view=rev
Log:
Fix error in llvm-pdbutil.
A recent change made this print the wrong value, breaking some
tests. This is now fixed.
Modified:
llvm/trunk/tools/llvm-pdbutil/DumpOutputStyle.cpp
Modified: llvm/trunk/tools/llvm-pdbutil/DumpOutputStyle.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbutil/DumpOutputStyle.cpp?rev=319862&r1=319861&r2=319862&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbutil/DumpOutputStyle.cpp (original)
+++ llvm/trunk/tools/llvm-pdbutil/DumpOutputStyle.cpp Tue Dec 5 16:26:43 2017
@@ -923,12 +923,12 @@ static void buildDepSet(LazyRandomTypeCo
static void
dumpFullTypeStream(LinePrinter &Printer, LazyRandomTypeCollection &Types,
- uint32_t NumHashBuckets,
+ uint32_t NumTypeRecords, uint32_t NumHashBuckets,
FixedStreamArray<support::ulittle32_t> HashValues,
bool Bytes, bool Extras) {
- Printer.formatLine("Showing {0:N} records", Types.size());
- uint32_t Width = NumDigits(TypeIndex::FirstNonSimpleIndex + Types.size());
+ Printer.formatLine("Showing {0:N} records", NumTypeRecords);
+ uint32_t Width = NumDigits(TypeIndex::FirstNonSimpleIndex + NumTypeRecords);
MinimalTypeDumpVisitor V(Printer, Width + 2, Bytes, Extras, Types,
NumHashBuckets, HashValues);
@@ -1002,7 +1002,7 @@ Error DumpOutputStyle::dumpTypesFromObje
Types.reset(Reader, 100);
if (opts::dump::DumpTypes) {
- dumpFullTypeStream(P, Types, 0, {}, opts::dump::DumpTypeData, false);
+ dumpFullTypeStream(P, Types, 0, 0, {}, opts::dump::DumpTypeData, false);
} else if (opts::dump::DumpTypeExtras) {
auto LocalHashes = LocallyHashedType::hashTypeCollection(Types);
auto GlobalHashes = GloballyHashedType::hashTypeCollection(Types);
@@ -1073,8 +1073,9 @@ Error DumpOutputStyle::dumpTpiStream(uin
if (DumpTypes || !Indices.empty()) {
if (Indices.empty())
- dumpFullTypeStream(P, Types, Stream.getNumHashBuckets(),
- Stream.getHashValues(), DumpBytes, DumpExtras);
+ dumpFullTypeStream(P, Types, Stream.getNumTypeRecords(),
+ Stream.getNumHashBuckets(), Stream.getHashValues(),
+ DumpBytes, DumpExtras);
else {
std::vector<TypeIndex> TiList(Indices.begin(), Indices.end());
dumpPartialTypeStream(P, Types, Stream, TiList, DumpBytes, DumpExtras,
More information about the llvm-commits
mailing list