mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user