mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Stop leaking memory from Module and FileUnit.
Also, disallow creating Modules and FileUnits on the stack. They must always live as long as the ASTContext. <rdar://problem/15596964> Swift SVN r13671
This commit is contained in:
@@ -132,6 +132,8 @@ class SerializedASTFile final : public LoadedFile {
|
||||
|
||||
ModuleFile &File;
|
||||
|
||||
~SerializedASTFile() = default;
|
||||
|
||||
SerializedASTFile(Module &M, ModuleFile &file)
|
||||
: LoadedFile(FileUnitKind::SerializedAST, M), File(file) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user