swift-syntax-test: teach the test driver to accept RequestEvaluatorGraphVizPath.

This commit is contained in:
Xi Ge
2018-08-29 11:13:42 -07:00
parent 30e73ec995
commit 9f7e2f7610

View File

@@ -213,6 +213,11 @@ Visual("v",
llvm::cl::desc("Print visually"),
llvm::cl::cat(Category),
llvm::cl::init(false));
static llvm::cl::opt<std::string>
GraphVisPath("output-request-graphviz",
llvm::cl::desc("Emit GraphViz output visualizing the request graph."),
llvm::cl::cat(Category));
} // end namespace options
namespace {
@@ -595,6 +600,7 @@ int parseFile(
CompilerInvocation Invocation;
Invocation.getLangOptions().BuildSyntaxTree = true;
Invocation.getLangOptions().VerifySyntaxTree = options::VerifySyntaxTree;
Invocation.getLangOptions().RequestEvaluatorGraphVizPath = options::GraphVisPath;
Invocation.getFrontendOptions().InputsAndOutputs.addInputFile(InputFileName);
Invocation.setMainExecutablePath(
llvm::sys::fs::getMainExecutable(MainExecutablePath,