Added error reporting to IRForTarget so that the
user doesn't have to enable logging to see where
something went wrong.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124342 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/ClangExpressionParser.cpp b/source/Expression/ClangExpressionParser.cpp
index 536160b..29d3c3e 100644
--- a/source/Expression/ClangExpressionParser.cpp
+++ b/source/Expression/ClangExpressionParser.cpp
@@ -11,6 +11,7 @@
#include "lldb/Core/ArchSpec.h"
#include "lldb/Core/DataBufferHeap.h"
+#include "lldb/Core/Debugger.h"
#include "lldb/Core/Disassembler.h"
#include "lldb/Core/Stream.h"
#include "lldb/Core/StreamString.h"
@@ -467,9 +468,15 @@
if (decl_map)
{
+ Stream *error_stream = NULL;
+
+ if (exe_ctx.target)
+ error_stream = &exe_ctx.target->GetDebugger().GetErrorStream();
+
IRForTarget ir_for_target(decl_map,
m_expr.NeedsVariableResolution(),
const_result,
+ error_stream,
function_name.c_str());
if (!ir_for_target.runOnModule(*module))