mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 05:56:07 +00:00
[clang] Use SmallString::operator std::string() (NFC)
This commit is contained in:
parent
15179aa433
commit
eccd279979
@ -2204,7 +2204,7 @@ void CompilerInstance::createModuleFromSource(SourceLocation ImportLoc,
|
||||
// Build the module, inheriting any modules that we've built locally.
|
||||
if (compileModuleImpl(*this, ImportLoc, ModuleName, Input, StringRef(),
|
||||
ModuleFileName, PreBuildStep, PostBuildStep)) {
|
||||
BuiltModules[std::string(ModuleName)] = std::string(ModuleFileName.str());
|
||||
BuiltModules[std::string(ModuleName)] = std::string(ModuleFileName);
|
||||
llvm::sys::RemoveFileOnSignal(ModuleFileName);
|
||||
}
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ public:
|
||||
SmallString<128> Path(Filename);
|
||||
llvm::sys::path::replace_extension(Path,
|
||||
NewSuffix + llvm::sys::path::extension(Path));
|
||||
return std::string(Path.str());
|
||||
return std::string(Path);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -64,7 +64,7 @@ std::string GetExecutablePath(const char *Argv0, bool CanonicalPrefixes) {
|
||||
if (llvm::ErrorOr<std::string> P =
|
||||
llvm::sys::findProgramByName(ExecutablePath))
|
||||
ExecutablePath = *P;
|
||||
return std::string(ExecutablePath.str());
|
||||
return std::string(ExecutablePath);
|
||||
}
|
||||
|
||||
// This just needs to be some symbol in the binary; C++ doesn't
|
||||
|
Loading…
x
Reference in New Issue
Block a user