[llvm] r221422 - Remove unnecessary .c_str() when implicitly converting to Twine
Matt Arsenault
Matthew.Arsenault at amd.com
Wed Nov 5 17:13:27 PST 2014
Author: arsenm
Date: Wed Nov 5 19:13:27 2014
New Revision: 221422
URL: http://llvm.org/viewvc/llvm-project?rev=221422&view=rev
Log:
Remove unnecessary .c_str() when implicitly converting to Twine
Modified:
llvm/trunk/lib/Support/SourceMgr.cpp
Modified: llvm/trunk/lib/Support/SourceMgr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/SourceMgr.cpp?rev=221422&r1=221421&r2=221422&view=diff
==============================================================================
--- llvm/trunk/lib/Support/SourceMgr.cpp (original)
+++ llvm/trunk/lib/Support/SourceMgr.cpp Wed Nov 5 19:13:27 2014
@@ -49,14 +49,14 @@ unsigned SourceMgr::AddIncludeFile(const
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)
More information about the llvm-commits
mailing list