add ASTContext symbol-graph arg in unit tests

This commit is contained in:
Victoria Mitchell
2021-07-01 09:05:02 -06:00
parent 85fabb23ed
commit ff766fce37
6 changed files with 14 additions and 4 deletions

View File

@@ -17,6 +17,7 @@
#include "swift/Frontend/ModuleInterfaceLoader.h"
#include "swift/Frontend/PrintingDiagnosticConsumer.h"
#include "swift/Serialization/Validation.h"
#include "swift/SymbolGraphGen/SymbolGraphOptions.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/VirtualFileSystem.h"
@@ -100,10 +101,11 @@ protected:
langOpts.Target = llvm::Triple(llvm::sys::getDefaultTargetTriple());
SearchPathOptions searchPathOpts;
ClangImporterOptions clangImpOpts;
symbolgraphgen::SymbolGraphOptions symbolGraphOpts;
SILOptions silOpts;
auto ctx =
ASTContext::get(langOpts, typeckOpts, searchPathOpts, clangImpOpts,
sourceMgr, diags);
symbolGraphOpts, sourceMgr, diags);
ctx->addModuleInterfaceChecker(
std::make_unique<ModuleInterfaceCheckerImpl>(*ctx, cacheDir,