|
@@ -27,14 +27,18 @@ class Driver {
|
|
|
|
|
|
|
|
// Per-file success results. May be empty if files aren't individually
|
|
// Per-file success results. May be empty if files aren't individually
|
|
|
// processed.
|
|
// processed.
|
|
|
- llvm::SmallVector<std::pair<llvm::StringRef, bool>> per_file_success;
|
|
|
|
|
|
|
+ llvm::SmallVector<std::pair<std::string, bool>> per_file_success;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// Constructs a driver with any error or informational output directed to a
|
|
// Constructs a driver with any error or informational output directed to a
|
|
|
// specified stream.
|
|
// specified stream.
|
|
|
- Driver(llvm::vfs::FileSystem& fs, llvm::raw_pwrite_stream& output_stream,
|
|
|
|
|
|
|
+ Driver(llvm::vfs::FileSystem& fs, llvm::StringRef data_dir,
|
|
|
|
|
+ llvm::raw_pwrite_stream& output_stream,
|
|
|
llvm::raw_pwrite_stream& error_stream)
|
|
llvm::raw_pwrite_stream& error_stream)
|
|
|
- : fs_(fs), output_stream_(output_stream), error_stream_(error_stream) {}
|
|
|
|
|
|
|
+ : fs_(fs),
|
|
|
|
|
+ data_dir_(data_dir),
|
|
|
|
|
+ output_stream_(output_stream),
|
|
|
|
|
+ error_stream_(error_stream) {}
|
|
|
|
|
|
|
|
// Parses the given arguments into both a subcommand to select the operation
|
|
// Parses the given arguments into both a subcommand to select the operation
|
|
|
// to perform and any arguments to that subcommand.
|
|
// to perform and any arguments to that subcommand.
|
|
@@ -61,9 +65,18 @@ class Driver {
|
|
|
// Implements the compile subcommand of the driver.
|
|
// Implements the compile subcommand of the driver.
|
|
|
auto Compile(const CompileOptions& options) -> RunResult;
|
|
auto Compile(const CompileOptions& options) -> RunResult;
|
|
|
|
|
|
|
|
|
|
+ // The filesystem for source code.
|
|
|
llvm::vfs::FileSystem& fs_;
|
|
llvm::vfs::FileSystem& fs_;
|
|
|
|
|
+
|
|
|
|
|
+ // The path within fs for data files.
|
|
|
|
|
+ std::string data_dir_;
|
|
|
|
|
+
|
|
|
|
|
+ // Standard output; stdout.
|
|
|
llvm::raw_pwrite_stream& output_stream_;
|
|
llvm::raw_pwrite_stream& output_stream_;
|
|
|
|
|
+ // Error output; stderr.
|
|
|
llvm::raw_pwrite_stream& error_stream_;
|
|
llvm::raw_pwrite_stream& error_stream_;
|
|
|
|
|
+
|
|
|
|
|
+ // For CARBON_VLOG.
|
|
|
llvm::raw_pwrite_stream* vlog_stream_ = nullptr;
|
|
llvm::raw_pwrite_stream* vlog_stream_ = nullptr;
|
|
|
};
|
|
};
|
|
|
|
|
|