mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
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:
parent
6c100e7428
commit
4ebcbd0af7
@ -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
Block a user