mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
revert r4968, it apparently breaks the world. I'll recommit it when I have time to investigate.
Swift SVN r4971
This commit is contained in:
@@ -62,14 +62,11 @@ static Identifier getModuleIdentifier(StringRef OutputName,
|
||||
return Context.getIdentifier(moduleName);
|
||||
}
|
||||
|
||||
|
||||
/// "SIL" is non-null when we're parsing a .sil file instead of a .swift file.
|
||||
TranslationUnit*
|
||||
swift::buildSingleTranslationUnit(ASTContext &Context,
|
||||
StringRef OutputName,
|
||||
ArrayRef<unsigned> BufferIDs,
|
||||
bool ParseOnly, bool IsMainModule,
|
||||
SILModule *SIL) {
|
||||
bool ParseOnly, bool IsMainModule) {
|
||||
Component *Comp = new (Context.Allocate<Component>(1)) Component();
|
||||
Identifier ID = getModuleIdentifier(OutputName, Context, IsMainModule);
|
||||
TranslationUnit *TU = new (Context) TranslationUnit(ID, Comp, Context,
|
||||
@@ -83,7 +80,7 @@ swift::buildSingleTranslationUnit(ASTContext &Context,
|
||||
const llvm::MemoryBuffer *Buffer =
|
||||
Context.SourceMgr.getMemoryBuffer(BufferID);
|
||||
do {
|
||||
parseIntoTranslationUnit(TU, BufferID, &BufferOffset, 0, SIL);
|
||||
parseIntoTranslationUnit(TU, BufferID, &BufferOffset);
|
||||
if (!ParseOnly && BufferIDs.size() == 1) {
|
||||
performNameBinding(TU, CurTUElem);
|
||||
performTypeChecking(TU, CurTUElem);
|
||||
|
||||
Reference in New Issue
Block a user