[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

@@ -699,7 +699,7 @@ bool swift::emitLoadedModuleTraceIfNeeded(ModuleDecl *mainModule,
assert(!ctxt.hadError() &&
"We should've already exited earlier if there was an error.");
auto loadedModuleTracePath = input.loadedModuleTracePath();
auto loadedModuleTracePath = input.getLoadedModuleTracePath();
if (loadedModuleTracePath.empty())
return false;
std::error_code EC;