summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/DiagnosticManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Expression/DiagnosticManager.cpp')
-rw-r--r--lldb/source/Expression/DiagnosticManager.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/source/Expression/DiagnosticManager.cpp b/lldb/source/Expression/DiagnosticManager.cpp
index 5ade0817b1e..ae20feb910d 100644
--- a/lldb/source/Expression/DiagnosticManager.cpp
+++ b/lldb/source/Expression/DiagnosticManager.cpp
@@ -79,3 +79,12 @@ size_t DiagnosticManager::PutString(DiagnosticSeverity severity,
AddDiagnostic(str, severity, eDiagnosticOriginLLDB);
return str.size();
}
+
+void DiagnosticManager::CopyDiagnostics(DiagnosticManager &otherDiagnostics) {
+ for (const DiagnosticList::value_type &other_diagnostic:
+ otherDiagnostics.Diagnostics()) {
+ AddDiagnostic(
+ other_diagnostic->GetMessage(), other_diagnostic->GetSeverity(),
+ other_diagnostic->getKind(), other_diagnostic->GetCompilerID());
+ }
+}
OpenPOWER on IntegriCloud