[NFC] Fixup InputFile Convenience Getters

Follow programming guidelines for these getters more closely and have them return a non-owning view of the underlying data instead of relying on callers to take const references to the copy that is returned here.
This commit is contained in:
Robert Widmann
2020-11-12 12:43:43 -08:00
parent a89f8e04d6
commit 76d25e7097
4 changed files with 27 additions and 23 deletions

View File

@@ -91,7 +91,7 @@ bool swift::emitMakeDependenciesIfNeeded(DiagnosticEngine &diags,
DependencyTracker *depTracker,
const FrontendOptions &opts,
const InputFile &input) {
const std::string &dependenciesFilePath = input.dependenciesFilePath();
auto dependenciesFilePath = input.getDependenciesFilePath();
if (dependenciesFilePath.empty())
return false;