Skip to content

Commit

Permalink
[InstallAPI] Replace std::string -> StringRef
Browse files Browse the repository at this point in the history
  • Loading branch information
cyndyishida committed Apr 13, 2024
1 parent 6dcb604 commit 79dca25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clang/tools/clang-installapi/Options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ bool Options::addFilePaths(InputArgList &Args, PathSeq &Headers,
}
// Sort headers to ensure deterministic behavior.
sort(*InputHeadersOrErr);
for (std::string &H : *InputHeadersOrErr)
for (StringRef H : *InputHeadersOrErr)
Headers.emplace_back(std::move(H));
} else
Headers.emplace_back(Path);
Expand Down Expand Up @@ -690,7 +690,7 @@ InstallAPIContext Options::createContext() {
FrameworkName = getFrameworkNameFromInstallName(LinkerOpts.InstallName);

// Process inputs.
for (const std::string &ListPath : DriverOpts.FileLists) {
for (const StringRef ListPath : DriverOpts.FileLists) {
auto Buffer = FM->getBufferForFile(ListPath);
if (auto Err = Buffer.getError()) {
Diags->Report(diag::err_cannot_open_file) << ListPath << Err.message();
Expand Down

0 comments on commit 79dca25

Please sign in to comment.