Refactor the code that erases sil functions into a new method, eraseFunction, and remember to clean the function table.

Swift SVN r11999
This commit is contained in:
Nadav Rotem
2014-01-07 18:18:10 +00:00
parent 301b9a6aa4
commit c391e8162e
2 changed files with 8 additions and 2 deletions

View File

@@ -156,7 +156,13 @@ public:
const Lowering::TypeLowering &getTypeLowering(SILType t) {
return Types.getTypeLowering(t);
}
/// Erase a function from the module.
void eraseFunction(SILFunction *F) {
getFunctionList().erase(F);
FunctionTable.erase(F->getName());
}
/// Construct a SIL module from an AST module.
///
/// The module will be constructed in the Raw stage. The provided AST module