File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff 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 {
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments