Added support for indicating to the expression parser
that the result of an expression should be coerced to
a specific type. Also made breakpoint conditions pass
in the bool type for this type.
The expression parser ignores this indication for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119779 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Breakpoint/BreakpointOptions.cpp b/source/Breakpoint/BreakpointOptions.cpp
index 713c2e9..975c836 100644
--- a/source/Breakpoint/BreakpointOptions.cpp
+++ b/source/Breakpoint/BreakpointOptions.cpp
@@ -18,6 +18,7 @@
#include "lldb/Core/Value.h"
#include "lldb/Breakpoint/StoppointCallbackContext.h"
#include "lldb/Target/Process.h"
+#include "lldb/Target/Target.h"
#include "lldb/Target/ThreadSpec.h"
#include "lldb/Target/ThreadPlanTestCondition.h"
@@ -193,8 +194,12 @@
exe_ctx.process->SetDynamicCheckers(dynamic_checkers);
}
+
+ // Get the boolean type from the process's scratch AST context
+ ClangASTContext *ast_context = exe_ctx.target->GetScratchClangASTContext();
+ TypeFromUser bool_type(ast_context->GetBuiltInType_bool(), ast_context->getASTContext());
- if (!m_condition_ap->Parse (error_stream, exe_ctx))
+ if (!m_condition_ap->Parse (error_stream, exe_ctx, bool_type))
{
// Errors mean we should stop.
return NULL;