Skip to content

Commit 79dca25

Browse files
committed
[InstallAPI] Replace std::string -> StringRef
1 parent 6dcb604 commit 79dca25

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/tools/clang-installapi/Options.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ bool Options::addFilePaths(InputArgList &Args, PathSeq &Headers,
372372
}
373373
// Sort headers to ensure deterministic behavior.
374374
sort(*InputHeadersOrErr);
375-
for (std::string &H : *InputHeadersOrErr)
375+
for (StringRef H : *InputHeadersOrErr)
376376
Headers.emplace_back(std::move(H));
377377
} else
378378
Headers.emplace_back(Path);
@@ -690,7 +690,7 @@ InstallAPIContext Options::createContext() {
690690
FrameworkName = getFrameworkNameFromInstallName(LinkerOpts.InstallName);
691691

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

0 commit comments

Comments
 (0)