mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Refactor InstallPaths API and comments a little. (#4341)
Stemming from #4331, trying to break apart InstallPaths class comments into three parts: - Construction semantics, staying in the class comment - Trying to refer to methods with more detailed documentation. - Install prefix contents, now on `prefix_` - Install structure, consolidating on `install_dirs` For code refactoring, `driver()` and `prefix()` were only used by the install paths test. Rather than having a comment not to use `prefix()`, this instead extracts it out to a TestPeer model (which we have elsewhere with `TypedNodesTestPeer`, thus my choice in approaches).
This commit is contained in:
@@ -146,13 +146,6 @@ auto InstallPaths::CheckMarkerFile() -> void {
|
||||
}
|
||||
}
|
||||
|
||||
auto InstallPaths::driver() const -> std::string {
|
||||
llvm::SmallString<256> path(prefix_);
|
||||
// TODO: Adjust this to work equally well on Windows.
|
||||
llvm::sys::path::append(path, llvm::sys::path::Style::posix, "bin/carbon");
|
||||
return path.str().str();
|
||||
}
|
||||
|
||||
auto InstallPaths::core_package() const -> std::string {
|
||||
llvm::SmallString<256> path(prefix_);
|
||||
// TODO: Adjust this to work equally well on Windows.
|
||||
|
||||
Reference in New Issue
Block a user