mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Fix a leak that I introduced in r14729: FrontendOptions does not own input
buffers, so undo 'unique_ptr'fication here Swift SVN r14733
This commit is contained in:
@@ -245,6 +245,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
// If it looks like we have an AST, set the source file kind to SIL and the
|
||||
// name of the module to the file's name.
|
||||
Invocation.addInputBuffer(InputFile.get());
|
||||
bool IsModule = false;
|
||||
if (SerializedModuleLoader::isSerializedAST(InputFile.get()->getBuffer())) {
|
||||
IsModule = true;
|
||||
@@ -257,7 +258,6 @@ int main(int argc, char **argv) {
|
||||
Invocation.setModuleName("main");
|
||||
Invocation.setInputKind(SourceFileKind::SIL);
|
||||
}
|
||||
Invocation.addInputBuffer(std::move(InputFile));
|
||||
|
||||
CompilerInstance CI;
|
||||
PrintingDiagnosticConsumer PrintDiags;
|
||||
|
||||
Reference in New Issue
Block a user