Skip to content

Commit eccd279

Browse files
[clang] Use SmallString::operator std::string() (NFC)
1 parent 15179aa commit eccd279

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

clang/lib/Frontend/CompilerInstance.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2204,7 +2204,7 @@ void CompilerInstance::createModuleFromSource(SourceLocation ImportLoc,
22042204
// Build the module, inheriting any modules that we've built locally.
22052205
if (compileModuleImpl(*this, ImportLoc, ModuleName, Input, StringRef(),
22062206
ModuleFileName, PreBuildStep, PostBuildStep)) {
2207-
BuiltModules[std::string(ModuleName)] = std::string(ModuleFileName.str());
2207+
BuiltModules[std::string(ModuleName)] = std::string(ModuleFileName);
22082208
llvm::sys::RemoveFileOnSignal(ModuleFileName);
22092209
}
22102210
}

clang/lib/Frontend/Rewrite/FrontendActions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class FixItActionSuffixInserter : public FixItOptions {
7777
SmallString<128> Path(Filename);
7878
llvm::sys::path::replace_extension(Path,
7979
NewSuffix + llvm::sys::path::extension(Path));
80-
return std::string(Path.str());
80+
return std::string(Path);
8181
}
8282
};
8383

clang/tools/driver/driver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ std::string GetExecutablePath(const char *Argv0, bool CanonicalPrefixes) {
6464
if (llvm::ErrorOr<std::string> P =
6565
llvm::sys::findProgramByName(ExecutablePath))
6666
ExecutablePath = *P;
67-
return std::string(ExecutablePath.str());
67+
return std::string(ExecutablePath);
6868
}
6969

7070
// This just needs to be some symbol in the binary; C++ doesn't

0 commit comments

Comments
 (0)