expand the TranslationUnit kind to handle "standard library", and

plumb it through the compiler a bit.  This simplifies some code
in the driver, but should not induce any behavior change (yet).


Swift SVN r5740
This commit is contained in:
Chris Lattner
2013-06-21 17:42:37 +00:00
parent bc903a5513
commit e8bf1dd6f5
7 changed files with 21 additions and 32 deletions

View File

@@ -94,10 +94,10 @@ static llvm::error_code findModule(ASTContext &ctx, AccessPathElem moduleID,
static Module *makeTU(ASTContext &ctx, AccessPathElem moduleID,
ArrayRef<StringRef> inputPaths) {
// FIXME: The kind of the TU should be read from the serialized file.
Component *comp = new (ctx.Allocate<Component>(1)) Component();
TranslationUnit *TU = new (ctx) TranslationUnit(moduleID.first, comp, ctx,
/*IsMainModule=*/false,
/*IsReplModule=*/false);
TranslationUnit::Library);
ctx.LoadedModules[moduleID.first.str()] = TU;