mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Simplify some code in SourceFile, NFC
This commit is contained in:
@@ -1325,8 +1325,7 @@ SourceFile::SourceFile(ModuleDecl &M, SourceFileKind K,
|
||||
bool KeepTokens)
|
||||
: FileUnit(FileUnitKind::Source, M),
|
||||
BufferID(bufferID ? *bufferID : -1),
|
||||
Kind(K),
|
||||
EnabledAndAllCorrectedTokens(KeepTokens, std::vector<Token>()) {
|
||||
Kind(K) {
|
||||
M.getASTContext().addDestructorCleanup(*this);
|
||||
performAutoImport(*this, ModImpKind);
|
||||
|
||||
@@ -1335,6 +1334,9 @@ SourceFile::SourceFile(ModuleDecl &M, SourceFileKind K,
|
||||
assert(!problem && "multiple main files?");
|
||||
(void)problem;
|
||||
}
|
||||
if (KeepTokens) {
|
||||
pAllCorrectedTokens.reset(new std::vector<Token>());
|
||||
}
|
||||
}
|
||||
|
||||
SourceFile::~SourceFile() {}
|
||||
|
||||
Reference in New Issue
Block a user