Don't register the addresses of private symbols from expressions.

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
This commit is contained in:
Sean Callanan 2016-03-30 03:44:51 +00:00
parent 49cad7d70b
commit 3ce036b434
1 changed files with 1 additions and 1 deletions

View 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();