Skip to content

Commit 34937f7

Browse files
author
marcrasi
authored
---
yaml --- r: 294639 b: refs/heads/tensorflow c: c187300 h: refs/heads/master i: 294637: be7307b 294635: 848ffe0 294631: b695dd9 294623: ee5fbe5
1 parent 47c4288 commit 34937f7

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-04-25-a: 22f738a831d43aff2b9c9773bcb65
816816
refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-05-08-a: 7d98cc16689baba5c8a3b90a9329bdcc1a12b4e9
817817
refs/heads/cherr42: a566ad54b073c2c56ac0a705d0a5bed9743135a5
818818
"refs/heads/codable_test_comment_fix": fc8f6824f7f347e1e8db55bff62db385c5728b5a
819-
refs/heads/tensorflow: 46d5a2d2e34b8d0cbcf08ca9dbb4e993ff357610
819+
refs/heads/tensorflow: c187300c09aea70dbee873cf475ad8a96ef031ab
820820
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-11-a: 8126fd7a652e2f70ad6d76505239e34fb2ef3e1a
821821
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-12-a: b3fd3dd84df6717f2e2e9df58c6d7e99fed57086
822822
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-13-a: 71135119579039dc321c5f65d870050fe36efda2

branches/tensorflow/include/swift/Frontend/Frontend.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -518,12 +518,6 @@ class CompilerInstance {
518518
/// Returns true if there was an error during setup.
519519
bool setup(const CompilerInvocation &Invocation);
520520

521-
/// Returns true if there was an error during setup.
522-
/// \param BaseFS Use this, instead of the real filesystem, as the vase
523-
/// filesystem.
524-
bool setup(const CompilerInvocation &Invocation,
525-
llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> BaseFS);
526-
527521
private:
528522
/// Set up the file system by loading and validating all VFS overlay YAML
529523
/// files. If the process of validating VFS files failed, or the overlay

branches/tensorflow/lib/Frontend/Frontend.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -176,17 +176,8 @@ void CompilerInstance::recordPrimarySourceFile(SourceFile *SF) {
176176
}
177177

178178
bool CompilerInstance::setup(const CompilerInvocation &Invok) {
179-
return setup(Invok, llvm::vfs::getRealFileSystem());
180-
}
181-
182-
bool CompilerInstance::setup(
183-
const CompilerInvocation &Invok,
184-
llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> BaseFS) {
185-
assert(BaseFS);
186179
Invocation = Invok;
187180

188-
SourceMgr.setFileSystem(BaseFS);
189-
190181
// If initializing the overlay file system fails there's no sense in
191182
// continuing because the compiler will read the wrong files.
192183
if (setUpVirtualFileSystemOverlays())
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import SwiftModule
2+
3+
func foo(
4+
_ structDefinedInSwiftModule: StructDefinedInSwiftModule
5+
) {
6+
structDefinedInSwiftModule.
7+
}
8+
9+
// CHECK: key.name: "methodDefinedInSwiftModule()"
10+
11+
// RUN: %empty-directory(%t)
12+
// RUN: %target-swift-frontend -emit-parseable-module-interface-path %t/SwiftModule.swiftinterface -module-name SwiftModule -emit-module -o /dev/null %S/../Inputs/vfs/SwiftModule/SwiftModule.swift
13+
// RUN: %sourcekitd-test -req=complete -pos=6:31 -vfs-files=/target_file1.swift=%s,/SwiftModule/SwiftModule.swiftinterface=%t/SwiftModule.swiftinterface /target_file1.swift -- /target_file1.swift -I /SwiftModule | %FileCheck %s

branches/tensorflow/tools/SourceKit/lib/SwiftLang/SwiftASTManager.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,8 @@ ASTUnitRef ASTProducer::createASTUnit(SwiftASTManager::Implementation &MgrImpl,
927927

928928
Invocation.getLangOptions().CollectParsedToken = true;
929929

930-
if (CompIns.setup(Invocation, InvokRef->Impl.Opts.FileSystem)) {
930+
CompIns.getSourceMgr().setFileSystem(InvokRef->Impl.Opts.FileSystem);
931+
if (CompIns.setup(Invocation)) {
931932
// FIXME: Report the diagnostic.
932933
LOG_WARN_FUNC("Compilation setup failed!!!");
933934
Error = "compilation setup failed";

branches/tensorflow/tools/SourceKit/lib/SwiftLang/SwiftCompletion.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ static bool swiftCodeCompleteImpl(
185185
// FIXME: We need to be passing the buffers from the open documents.
186186
// It is not a huge problem in practice because Xcode auto-saves constantly.
187187

188-
if (CI.setup(Invocation, FileSystem)) {
188+
CI.getSourceMgr().setFileSystem(FileSystem);
189+
if (CI.setup(Invocation)) {
189190
// FIXME: error?
190191
return true;
191192
}

0 commit comments

Comments
 (0)