summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp')
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp
index 0d0d7475a00..a82394592c4 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp
@@ -74,11 +74,11 @@ ClangFunctionCaller::~ClangFunctionCaller()
}
unsigned
-ClangFunctionCaller::CompileFunction (Stream &errors)
+ClangFunctionCaller::CompileFunction(DiagnosticManager &diagnostic_manager)
{
if (m_compiled)
return 0;
-
+
// FIXME: How does clang tell us there's no return value? We need to handle that case.
unsigned num_errors = 0;
@@ -143,8 +143,9 @@ ClangFunctionCaller::CompileFunction (Stream &errors)
type_name = clang_qual_type.GetTypeName().AsCString("");
}
else
- {
- errors.Printf("Could not determine type of input value %" PRIu64 ".", (uint64_t)i);
+ {
+ diagnostic_manager.Printf(eDiagnosticSeverityError,
+ "Could not determine type of input value %" PRIu64 ".", (uint64_t)i);
return 1;
}
}
@@ -195,15 +196,15 @@ ClangFunctionCaller::CompileFunction (Stream &errors)
{
const bool generate_debug_info = true;
m_parser.reset(new ClangExpressionParser(jit_process_sp.get(), *this, generate_debug_info));
-
- num_errors = m_parser->Parse (errors);
+
+ num_errors = m_parser->Parse(diagnostic_manager);
}
else
{
- errors.Printf("no process - unable to inject function");
+ diagnostic_manager.PutCString(eDiagnosticSeverityError, "no process - unable to inject function");
num_errors = 1;
}
-
+
m_compiled = (num_errors == 0);
if (!m_compiled)
OpenPOWER on IntegriCloud