[Frontend] For CompilerInstance::performParseOnly() make sure to mark the main buffer so a hashbang is accepted.

Test case on the SourceKit side.
rdar://17282145

Swift SVN r19320
This commit is contained in:
Argyrios Kyrtzidis
2014-06-28 03:23:13 +00:00
parent ca8c683810
commit ab14eeb8cc

View File

@@ -436,6 +436,9 @@ void CompilerInstance::performParseOnly() {
assert(Kind == SourceFileKind::Main || Kind == SourceFileKind::Library);
assert(BufferIDs.size() == 1 && "only supports parsing a single file");
if (Kind == SourceFileKind::Main)
SourceMgr.setHashbangBufferID(BufferIDs[0]);
auto *Input = new (*Context) SourceFile(*MainModule,
Kind,
BufferIDs[0],