Remove unnecessary .c_str() when implicitly converting to Twine

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221422 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Matt Arsenault 2014-11-06 01:13:27 +00:00
parent 6c100e7428
commit 4ebcbd0af7

View File

@ -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)