forked from OSchip/llvm-project
Remove unnecessary .c_str() when implicitly converting to Twine
llvm-svn: 221422
This commit is contained in:
parent
5c4693d8d2
commit
6e863d12e5
|
@ -49,14 +49,14 @@ unsigned SourceMgr::AddIncludeFile(const std::string &Filename,
|
|||
std::string &IncludedFile) {
|
||||
IncludedFile = Filename;
|
||||
ErrorOr<std::unique_ptr<MemoryBuffer>> NewBufOrErr =
|
||||
MemoryBuffer::getFile(IncludedFile.c_str());
|
||||
MemoryBuffer::getFile(IncludedFile);
|
||||
|
||||
// If the file didn't exist directly, see if it's in an include path.
|
||||
for (unsigned i = 0, e = IncludeDirectories.size(); i != e && !NewBufOrErr;
|
||||
++i) {
|
||||
IncludedFile =
|
||||
IncludeDirectories[i] + sys::path::get_separator().data() + Filename;
|
||||
NewBufOrErr = MemoryBuffer::getFile(IncludedFile.c_str());
|
||||
NewBufOrErr = MemoryBuffer::getFile(IncludedFile);
|
||||
}
|
||||
|
||||
if (!NewBufOrErr)
|
||||
|
|
Loading…
Reference in New Issue