Skip to content

Commit 6e470f5

Browse files
committed
[unittest/Sema] NFC: Switch to use AttributedImport instead of deprecated ImportedModuleDesc
1 parent dc7c9c2 commit 6e470f5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

unittests/Sema/SemaFixture.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
#include "SemaFixture.h"
1414
#include "swift/AST/Decl.h"
15+
#include "swift/AST/Import.h"
1516
#include "swift/AST/Module.h"
1617
#include "swift/AST/ParseRequests.h"
1718
#include "swift/AST/SourceFile.h"
@@ -25,8 +26,6 @@
2526
using namespace swift;
2627
using namespace swift::unittest;
2728

28-
using ModuleDecl = SourceFile::ImportedModuleDesc;
29-
3029
SemaTest::SemaTest()
3130
: Context(*ASTContext::get(LangOpts, TypeCheckerOpts, SearchPathOpts,
3231
ClangImporterOpts, SourceMgr, Diags)) {
@@ -47,8 +46,8 @@ SemaTest::SemaTest()
4746
MainFile = new (Context) SourceFile(*module, SourceFileKind::Main,
4847
/*buffer=*/None);
4948

50-
auto stdlibImport =
51-
ModuleDesc({ImportPath::Access(), stdlib}, /*options=*/{});
49+
AttributedImport<ImportedModule> stdlibImport{{ImportPath::Access(), stdlib},
50+
/*options=*/{}};
5251

5352
MainFile->setImports(stdlibImport);
5453
module->addFile(*MainFile);

0 commit comments

Comments
 (0)