[llvm] r316461 - [codeview] Fix handling of S_HEAPALLOCSITE
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 24 10:02:40 PDT 2017
Author: rnk
Date: Tue Oct 24 10:02:40 2017
New Revision: 316461
URL: http://llvm.org/viewvc/llvm-project?rev=316461&view=rev
Log:
[codeview] Fix handling of S_HEAPALLOCSITE
The type index is from the TPI stream, not the IPI stream. Fix the
dumper, fix type index discovery, and add a test in LLD.
Also improve the log message we emit when we fail to rewrite type
indices in LLD. That's how I found this bug.
Modified:
llvm/trunk/lib/DebugInfo/CodeView/TypeIndexDiscovery.cpp
llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp
Modified: llvm/trunk/lib/DebugInfo/CodeView/TypeIndexDiscovery.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/CodeView/TypeIndexDiscovery.cpp?rev=316461&r1=316460&r2=316461&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/CodeView/TypeIndexDiscovery.cpp (original)
+++ llvm/trunk/lib/DebugInfo/CodeView/TypeIndexDiscovery.cpp Tue Oct 24 10:02:40 2017
@@ -413,8 +413,7 @@ static bool discoverTypeIndices(ArrayRef
Refs.push_back({TiRefKind::IndexRef, 8, 1}); // ID of inlinee
break;
case SymbolKind::S_HEAPALLOCSITE:
- // FIXME: It's not clear if this is a type or item reference.
- Refs.push_back({TiRefKind::IndexRef, 8, 1}); // signature
+ Refs.push_back({TiRefKind::TypeRef, 8, 1}); // UDT allocated
break;
// Defranges don't have types, just registers and code offsets.
Modified: llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp?rev=316461&r1=316460&r2=316461&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp (original)
+++ llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp Tue Oct 24 10:02:40 2017
@@ -615,7 +615,7 @@ Error MinimalSymbolDumper::visitKnownRec
Error MinimalSymbolDumper::visitKnownRecord(CVSymbol &CVR,
HeapAllocationSiteSym &HAS) {
AutoIndent Indent(P, 7);
- P.formatLine("type = {0}, addr = {1} call size = {2}", idIndex(HAS.Type),
+ P.formatLine("type = {0}, addr = {1} call size = {2}", typeIndex(HAS.Type),
formatSegmentOffset(HAS.Segment, HAS.CodeOffset),
HAS.CallInstructionSize);
return Error::success();
More information about the llvm-commits
mailing list