aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2021-08-31 08:53:51 -0700
committerKazu Hirata <kazu@google.com>2021-08-31 08:53:51 -0700
commitb8debabb775b6d9eec5aa16f1b0c3428cc076bcb (patch)
treeb2d318b332f0e228a6e086e8eb646a6e2eb351bb /clang/lib/Frontend/CompilerInstance.cpp
parentae206db2d653cfeb1021e4e8f5783de797e521a5 (diff)
downloadllvm-b8debabb775b6d9eec5aa16f1b0c3428cc076bcb.zip
llvm-b8debabb775b6d9eec5aa16f1b0c3428cc076bcb.tar.gz
llvm-b8debabb775b6d9eec5aa16f1b0c3428cc076bcb.tar.bz2
[clang] Remove redundant calls to c_str() (NFC)
Identified with readability-redundant-string-cstr.
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp3
1 files changed, 1 insertions, 2 deletions
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;