File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,12 @@ bool PurgeMetaDataUtils::runOnModule(Module &M)
108
108
{
109
109
pMdUtils->eraseFunctionsInfoItem (Iter);
110
110
}
111
- }
111
+
112
+ if (pContext->getModuleMetaData ()->FuncMD .find (F) != pContext->getModuleMetaData ()->FuncMD .end ())
113
+ {
114
+ pContext->getModuleMetaData ()->FuncMD .erase (F);
115
+ }
116
+ }
112
117
113
118
// Update when there is any change.
114
119
if (!ToBeDeleted.empty ())
Original file line number Diff line number Diff line change @@ -1460,6 +1460,12 @@ void PreCompiledFuncImport::createFuncWithIA()
1460
1460
m_pMdUtils->setFunctionsInfoItem (pNewFunc, oldFuncIter->second );
1461
1461
m_pMdUtils->eraseFunctionsInfoItem (oldFuncIter);
1462
1462
1463
+ if (m_pCtx->getModuleMetaData ()->FuncMD .find (pFunc) != m_pCtx->getModuleMetaData ()->FuncMD .end ())
1464
+ {
1465
+ m_pCtx->getModuleMetaData ()->FuncMD [pNewFunc] = m_pCtx->getModuleMetaData ()->FuncMD [pFunc];
1466
+ m_pCtx->getModuleMetaData ()->FuncMD .erase (pFunc);
1467
+ }
1468
+
1463
1469
// Map old func to new func
1464
1470
NewFuncWithIA.push_back (pNewFunc);
1465
1471
}
You can’t perform that action at this time.
0 commit comments