Check for missing symbols found during relocations.

This commit is contained in:
Axel Naumann 2015-01-09 09:40:58 +01:00 committed by sftnight
parent e919b241c8
commit 9bae38af55

View File

@ -283,8 +283,15 @@ IncrementalExecutor::runStaticInitializersOnce(llvm::Module* m) {
~AtExitModuleSetterRAII() { m_AEM = 0; }
} DSOHandleSetter(m, m_CurrentAtExitModule);
// We don't care whether something was unresolved before.
m_unresolvedSymbols.clear();
m_engine->finalizeObject();
// check if there is any unresolved symbol in the list
if (diagnoseUnresolvedSymbols("static initializers"))
return kExeUnresolvedSymbols;
llvm::GlobalVariable* GV
= m->getGlobalVariable("llvm.global_ctors", true);
// Nothing to do is good, too.
@ -307,9 +314,6 @@ IncrementalExecutor::runStaticInitializersOnce(llvm::Module* m) {
if (InitList == 0)
return kExeSuccess;
// We don't care whether something was unresolved before.
m_unresolvedSymbols.clear();
SmallVector<Function*, 2> initFuncs;
for (unsigned i = 0, e = InitList->getNumOperands(); i != e; ++i) {