From 4ebcbd0af758f772d1caeaba0d0b5eb68e7e9280 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Thu, 6 Nov 2014 01:13:27 +0000 Subject: [PATCH] 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 --- lib/Support/SourceMgr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Support/SourceMgr.cpp b/lib/Support/SourceMgr.cpp index f3a422c9d27..b50a66b2974 100644 --- a/lib/Support/SourceMgr.cpp +++ b/lib/Support/SourceMgr.cpp @@ -49,14 +49,14 @@ unsigned SourceMgr::AddIncludeFile(const std::string &Filename, std::string &IncludedFile) { IncludedFile = Filename; ErrorOr> 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)