mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[frontend] Input buffers have names too
There's no need to skip filename checks for in-memory buffers, and indeed we want sourcekitd to behave the same for main.swift files as the compiler. SR-6624 rdar://36113282
This commit is contained in:
@@ -233,7 +233,7 @@ bool CompilerInstance::setUpForInput(const InputFile &input) {
|
||||
return false;
|
||||
|
||||
if (isInSILMode() ||
|
||||
(input.buffer() == nullptr && isInputSwift() &&
|
||||
(isInputSwift() &&
|
||||
llvm::sys::path::filename(input.file()) == "main.swift")) {
|
||||
assert(MainBufferID == NO_SUCH_BUFFER && "re-setting MainBufferID");
|
||||
MainBufferID = *bufferID;
|
||||
|
||||
Reference in New Issue
Block a user