summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/PDB/Native
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-07-13 20:12:23 +0000
committerReid Kleckner <rnk@google.com>2017-07-13 20:12:23 +0000
commit6597c28d769c951720d6aef4851babd38f5c3f06 (patch)
tree49fbd05a5899f58c975dfc7e0a9e510aa307b84b /llvm/lib/DebugInfo/PDB/Native
parentf0c652a52e705a8dc43e350d4990f4acbffc1781 (diff)
downloadbcm5719-llvm-6597c28d769c951720d6aef4851babd38f5c3f06.tar.gz
bcm5719-llvm-6597c28d769c951720d6aef4851babd38f5c3f06.zip
[PDB] Fix type server handling for archives
Summary: This fixes type indices for SDK or CRT static archives. Previously we'd try to look next to the archive object file path, which would not exist on the local machine. Also error out if we can't resolve a type server record. Hypothetically we can recover from this error by discarding debug info for this object, but that is not yet implemented. Reviewers: ruiu, amccarth Subscribers: aprantl, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D35369 llvm-svn: 307946
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Native')
-rw-r--r--llvm/lib/DebugInfo/PDB/Native/PDBTypeServerHandler.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/PDBTypeServerHandler.cpp b/llvm/lib/DebugInfo/PDB/Native/PDBTypeServerHandler.cpp
index 9fd90102f72..e2f841ee893 100644
--- a/llvm/lib/DebugInfo/PDB/Native/PDBTypeServerHandler.cpp
+++ b/llvm/lib/DebugInfo/PDB/Native/PDBTypeServerHandler.cpp
@@ -58,10 +58,8 @@ PDBTypeServerHandler::handleInternal(PDBFile &File,
return ExpectedTpi.takeError();
// For handling a type server, we should be using whatever the callback array
- // was
- // that is being used for the original file. We shouldn't allow the visitor
- // to
- // arbitrarily stick a deserializer in there.
+ // was that is being used for the original file. We shouldn't allow the
+ // visitor to arbitrarily stick a deserializer in there.
if (auto EC = codeview::visitTypeStream(ExpectedTpi->typeArray(), Callbacks,
VDS_BytesExternal))
return std::move(EC);
@@ -122,5 +120,6 @@ Expected<bool> PDBTypeServerHandler::handle(TypeServer2Record &TS,
}
// We couldn't find a matching PDB, so let it be handled by someone else.
- return false;
+ return make_error<GenericError>(generic_error_code::type_server_not_found,
+ File);
}
OpenPOWER on IntegriCloud