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:
Chris Lattner
2013-04-29 16:58:43 +00:00
parent b503206bec
commit aafe3bdbdc
10 changed files with 25 additions and 47 deletions

View File

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