File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -779,10 +779,15 @@ llvm::cl::OptionCategory cat("cpp-rule-preprocessor options");
779779llvm::cl::opt<std::string>
780780 SrcDir (" dir" ,
781781 llvm::cl::desc (" Path to a rule directory containing src.c and/or "
782- " src.cpp. ir_src.json is written into this dir. " ),
782+ " src.cpp." ),
783783 llvm::cl::value_desc(" rule-dir" ), llvm::cl::Required,
784784 llvm::cl::cat(cat));
785785
786+ llvm::cl::opt<std::string>
787+ OutPath (" out" , llvm::cl::desc(" Path of the ir_src.json file to write." ),
788+ llvm::cl::value_desc(" out.json" ), llvm::cl::Required,
789+ llvm::cl::cat(cat));
790+
786791} // namespace
787792
788793int main (int argc, char *argv[]) {
@@ -809,7 +814,7 @@ int main(int argc, char *argv[]) {
809814 }
810815 }
811816
812- auto out_path = dir / " ir_src.json " ;
817+ fs::path out_path = OutPath. getValue () ;
813818 std::error_code ec;
814819 llvm::raw_fd_ostream out (out_path.string (), ec);
815820 if (ec) {
You can’t perform that action at this time.
0 commit comments