Skip to content

Commit 25a1e42

Browse files
Merge pull request #84663 from swiftlang/jepa-main2
Fix 2 leftover rebranch warnings
2 parents e9ca11e + f20a6bc commit 25a1e42

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

lib/Index/Index.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,12 @@ class SourceFileOrModule {
134134
}
135135

136136
ArrayRef<FileUnit *> getFiles() const {
137-
return isa<SourceFile *>(SFOrMod) ? *SFOrMod.getAddrOfPtr1()
138-
: cast<ModuleDecl *>(SFOrMod)->getFiles();
137+
if (isa<SourceFile *>(SFOrMod)) {
138+
SourceFile *const *SF = SFOrMod.getAddrOfPtr1();
139+
return ArrayRef((FileUnit *const *)SF, 1);
140+
} else {
141+
return cast<ModuleDecl *>(SFOrMod)->getFiles();
142+
}
139143
}
140144

141145
StringRef getFilename() const {

lib/Sema/ImportResolution.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -623,8 +623,7 @@ void ImportResolver::addImplicitImports() {
623623
const ModuleDecl *moduleToInherit = nullptr;
624624
if (underlyingClangModule) {
625625
moduleToInherit = underlyingClangModule;
626-
boundImports.push_back(
627-
AttributedImport(ImportedModule(underlyingClangModule)));
626+
boundImports.emplace_back(ImportedModule(underlyingClangModule));
628627
} else {
629628
moduleToInherit = SF.getParentModule();
630629
}

0 commit comments

Comments
 (0)