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:
Dmitri Hrybenko
2014-03-06 13:53:04 +00:00
parent d0fd7e48ee
commit 255b8e88c8
4 changed files with 6 additions and 6 deletions

View File

@@ -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;