[Lldb-commits] [lldb] r185057 - Fixed the IRInterpreter to reject any code that
Sean Callanan
scallanan at apple.com
Wed Jun 26 18:59:52 PDT 2013
Author: spyffe
Date: Wed Jun 26 20:59:51 2013
New Revision: 185057
URL: http://llvm.org/viewvc/llvm-project?rev=185057&view=rev
Log:
Fixed the IRInterpreter to reject any code that
has more than one function with a body. This
prevents declarations e.g. of blocks from being
passed to the IRInterpreter; they must pass
through to the JIT.
<rdar://problem/14180236>
Modified:
lldb/trunk/source/Expression/IRInterpreter.cpp
Modified: lldb/trunk/source/Expression/IRInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRInterpreter.cpp?rev=185057&r1=185056&r2=185057&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRInterpreter.cpp (original)
+++ lldb/trunk/source/Expression/IRInterpreter.cpp Wed Jun 26 20:59:51 2013
@@ -428,6 +428,20 @@ IRInterpreter::CanInterpret (llvm::Modul
{
lldb_private::Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
+ bool saw_function_with_body = false;
+
+ for (Module::iterator fi = module.begin(), fe = module.end();
+ fi != fe;
+ ++fi)
+ {
+ if (fi->begin() != fi->end())
+ {
+ if (saw_function_with_body)
+ return false;
+ saw_function_with_body = true;
+ }
+ }
+
for (Function::iterator bbi = function.begin(), bbe = function.end();
bbi != bbe;
++bbi)
More information about the lldb-commits
mailing list