summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-07-11 22:37:25 +0000
committerReid Kleckner <rnk@google.com>2017-07-11 22:37:25 +0000
commit447f6771337f509681f735ed5692b24def816347 (patch)
treefef9bc15c6f9e391d34039fdecc21aef842323f1 /llvm/lib
parentb0beb30fea73cf557e2a4c13d51ee38ba6fda762 (diff)
downloadbcm5719-llvm-447f6771337f509681f735ed5692b24def816347.tar.gz
bcm5719-llvm-447f6771337f509681f735ed5692b24def816347.zip
[codeview] Fix type index discovery for four symbol records
I encountered these when linking LLD, which uses atls.lib. Those objects appear to use these uncommon symbol records: 0x115E S_HEAPALLOCSITE 0x113D S_ENVBLOCK 0x1113 S_GTHREAD32 0x1153 S_FILESTATIC llvm-svn: 307725
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/DebugInfo/CodeView/TypeIndexDiscovery.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/CodeView/TypeIndexDiscovery.cpp b/llvm/lib/DebugInfo/CodeView/TypeIndexDiscovery.cpp
index 72cb9e2e354..0d935c4472a 100644
--- a/llvm/lib/DebugInfo/CodeView/TypeIndexDiscovery.cpp
+++ b/llvm/lib/DebugInfo/CodeView/TypeIndexDiscovery.cpp
@@ -382,6 +382,13 @@ static bool discoverTypeIndices(ArrayRef<uint8_t> Content, SymbolKind Kind,
case SymbolKind::S_BUILDINFO:
Refs.push_back({TiRefKind::IndexRef, 0, 1}); // Compile flags
break;
+ case SymbolKind::S_LTHREAD32:
+ case SymbolKind::S_GTHREAD32:
+ Refs.push_back({TiRefKind::TypeRef, 0, 1}); // Type
+ break;
+ case SymbolKind::S_FILESTATIC:
+ Refs.push_back({TiRefKind::TypeRef, 0, 1}); // Type
+ break;
case SymbolKind::S_LOCAL:
Refs.push_back({TiRefKind::TypeRef, 0, 1}); // Type
break;
@@ -403,6 +410,10 @@ static bool discoverTypeIndices(ArrayRef<uint8_t> Content, SymbolKind Kind,
case SymbolKind::S_INLINESITE:
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
+ break;
// Defranges don't have types, just registers and code offsets.
case SymbolKind::S_DEFRANGE_REGISTER:
@@ -419,6 +430,7 @@ static bool discoverTypeIndices(ArrayRef<uint8_t> Content, SymbolKind Kind,
case SymbolKind::S_COMPILE:
case SymbolKind::S_COMPILE2:
case SymbolKind::S_COMPILE3:
+ case SymbolKind::S_ENVBLOCK:
case SymbolKind::S_BLOCK32:
case SymbolKind::S_FRAMEPROC:
break;
OpenPOWER on IntegriCloud