Add a function to remove a global variable from a SILModule.

This API is useful for some global optimizations. If we can prove that a global is not used in the application, we can remove it.

Swift SVN r31529
This commit is contained in:
Roman Levenstein
2015-08-27 18:08:35 +00:00
parent 24b89de8e6
commit b5d964d536
2 changed files with 9 additions and 0 deletions

View File

@@ -210,6 +210,9 @@ public:
/// Erase a function from the module.
void eraseFunction(SILFunction *F);
/// Erase a global SIL variable from the module.
void eraseGlobalVariable(SILGlobalVariable *G);
/// Construct a SIL module from an AST module.
///
/// The module will be constructed in the Raw stage. The provided AST module