mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-14 15:28:20 +00:00
Fix typo. Add more comment. Avoid extra hash_map search.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31144 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -102,17 +102,19 @@ findExternalRefs(Value *value, std::set<std::string> &references,
|
|||||||
findExternalRefs(c->getOperand(i), references, mangler);
|
findExternalRefs(c->getOperand(i), references, mangler);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// If Moduel with InputFilename is available then remove it.
|
/// If Module with InputFilename is available then remove it from allModules
|
||||||
|
/// and call delete on it.
|
||||||
void
|
void
|
||||||
LTO::removeModule (const std::string &InputFilename)
|
LTO::removeModule (const std::string &InputFilename)
|
||||||
{
|
{
|
||||||
NameToModuleMap::iterator pos = allModules.find(InputFilename.c_str());
|
NameToModuleMap::iterator pos = allModules.find(InputFilename.c_str());
|
||||||
if (pos != allModules.end()) {
|
if (pos == allModules.end())
|
||||||
Module *m = allModules[InputFilename.c_str()];
|
return;
|
||||||
|
|
||||||
|
Module *m = pos->second;
|
||||||
allModules.erase(pos);
|
allModules.erase(pos);
|
||||||
delete m;
|
delete m;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/// InputFilename is a LLVM bytecode file. If Module with InputFilename is
|
/// InputFilename is a LLVM bytecode file. If Module with InputFilename is
|
||||||
/// available then return it. Otherwise parseInputFilename.
|
/// available then return it. Otherwise parseInputFilename.
|
||||||
|
Reference in New Issue
Block a user