Skip to content

Commit b4ae4ce

Browse files
committed
Address review comments using StringRef
1 parent 9e5c4a4 commit b4ae4ce

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

clang/include/clang/Driver/Driver.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -692,12 +692,11 @@ class Driver {
692692

693693
/// addIntegrationFiles - Add the integration files that will be populated
694694
/// by the device compilation and used by the host compile.
695-
void addIntegrationFiles(const char *IntHeaderName,
696-
const std::string &FileName) const {
695+
void addIntegrationFiles(StringRef IntHeaderName, StringRef FileName) const {
697696
IntegrationFileList.insert({FileName, IntHeaderName});
698697
}
699698
/// getIntegrationHeader - Get the integration header file
700-
StringRef getIntegrationHeader(const std::string &FileName) const {
699+
StringRef getIntegrationHeader(StringRef FileName) const {
701700
return IntegrationFileList[FileName];
702701
}
703702
};

clang/lib/Driver/Driver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5116,7 +5116,7 @@ void Driver::BuildActions(Compilation &C, DerivedArgList &Args,
51165116
std::string SrcFileName(I.second->getAsString(Args));
51175117
std::string TmpFileNameHeader = C.getDriver().GetTemporaryPath(
51185118
llvm::sys::path::stem(SrcFileName + "-header"), "h");
5119-
const char *TmpFileHeader =
5119+
StringRef TmpFileHeader =
51205120
C.addTempFile(C.getArgs().MakeArgString(TmpFileNameHeader));
51215121
addIntegrationFiles(TmpFileHeader, SrcFileName);
51225122
}

0 commit comments

Comments
 (0)