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 {
134
134
}
135
135
136
136
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
+ }
139
143
}
140
144
141
145
StringRef getFilename () const {
Original file line number Diff line number Diff line change @@ -623,8 +623,7 @@ void ImportResolver::addImplicitImports() {
623
623
const ModuleDecl *moduleToInherit = nullptr ;
624
624
if (underlyingClangModule) {
625
625
moduleToInherit = underlyingClangModule;
626
- boundImports.push_back (
627
- AttributedImport (ImportedModule (underlyingClangModule)));
626
+ boundImports.emplace_back (ImportedModule (underlyingClangModule));
628
627
} else {
629
628
moduleToInherit = SF.getParentModule ();
630
629
}
You can’t perform that action at this time.
0 commit comments