summaryrefslogtreecommitdiff
path: root/include/llvm/DebugInfo/CodeView/SymbolDeserializer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/DebugInfo/CodeView/SymbolDeserializer.h')
-rw-r--r--include/llvm/DebugInfo/CodeView/SymbolDeserializer.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/DebugInfo/CodeView/SymbolDeserializer.h b/include/llvm/DebugInfo/CodeView/SymbolDeserializer.h
index 5b6599d8c1db0..b5479db97a150 100644
--- a/include/llvm/DebugInfo/CodeView/SymbolDeserializer.h
+++ b/include/llvm/DebugInfo/CodeView/SymbolDeserializer.h
@@ -46,6 +46,12 @@ public:
return EC;
return Error::success();
}
+ template <typename T> static Expected<T> deserializeAs(CVSymbol Symbol) {
+ T Record(Symbol.kind());
+ if (auto EC = deserializeAs<T>(Symbol, Record))
+ return std::move(EC);
+ return Record;
+ }
explicit SymbolDeserializer(SymbolVisitorDelegate *Delegate,
CodeViewContainer Container)