From b8debabb775b6d9eec5aa16f1b0c3428cc076bcb Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Tue, 31 Aug 2021 08:53:51 -0700 Subject: [clang] Remove redundant calls to c_str() (NFC) Identified with readability-redundant-string-cstr. --- clang/lib/Frontend/CompilerInstance.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'clang/lib/Frontend/CompilerInstance.cpp') diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index 0f9bd70..8de2e75 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -2128,8 +2128,7 @@ void CompilerInstance::createModuleFromSource(SourceLocation ImportLoc, const FileEntry *ModuleMapFile = Other.getFileManager().getVirtualFile( ModuleMapFileName, NullTerminatedSource.size(), 0); Other.getSourceManager().overrideFileContents( - ModuleMapFile, - llvm::MemoryBuffer::getMemBuffer(NullTerminatedSource.c_str())); + ModuleMapFile, llvm::MemoryBuffer::getMemBuffer(NullTerminatedSource)); Other.BuiltModules = std::move(BuiltModules); Other.DeleteBuiltModules = false; -- cgit v1.1