Don't register the addresses of private symbols from expressions.
authorSean Callanan <scallanan@apple.com>
Wed, 30 Mar 2016 03:44:51 +0000 (03:44 +0000)
committerSean Callanan <scallanan@apple.com>
Wed, 30 Mar 2016 03:44:51 +0000 (03:44 +0000)
They're not supposed to go in the symbol table, and in fact the way the JIT
is currently implemented it sometimes crashes when you try to get the
address of such a function.  So we skip them.

llvm-svn: 264821

lldb/source/Expression/IRExecutionUnit.cpp

index db6f19a..1fc7b75 100644 (file)
@@ -344,7 +344,7 @@ IRExecutionUnit::GetRunnableInfo(Error &error,
 
     for (llvm::Function &function : *m_module)
     {
-        if (function.isDeclaration())
+        if (function.isDeclaration() || function.hasPrivateLinkage())
             continue;
         
         const bool external = function.hasExternalLinkage() || function.hasLinkOnceODRLinkage();