aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorYaron Keren <yaron.keren@gmail.com>2015-07-03 09:16:20 +0000
committerYaron Keren <yaron.keren@gmail.com>2015-07-03 09:16:20 +0000
commit452670165c93595257f7e09f6e4b7769124e74d7 (patch)
tree87c7d59007c30d8cb942bf7884e0fe6ed977f560 /clang/lib/Frontend/CompilerInstance.cpp
parent7779f75cc8203e752bd5f0bca0882605ecad9233 (diff)
downloadllvm-452670165c93595257f7e09f6e4b7769124e74d7.zip
llvm-452670165c93595257f7e09f6e4b7769124e74d7.tar.gz
llvm-452670165c93595257f7e09f6e4b7769124e74d7.tar.bz2
Replace some const std::string & with llvm::StringRef or std::string
and std::move to avoid implicit std::string construction. Patch by Eugene Kosov. llvm-svn: 241330
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index 6b0fed6..f42198d 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -405,7 +405,7 @@ void CompilerInstance::createPCHExternalASTSource(
}
IntrusiveRefCntPtr<ASTReader> CompilerInstance::createPCHExternalASTSource(
- StringRef Path, const std::string &Sysroot, bool DisablePCHValidation,
+ StringRef Path, StringRef Sysroot, bool DisablePCHValidation,
bool AllowPCHWithCompilerErrors, Preprocessor &PP, ASTContext &Context,
const PCHContainerOperations &PCHContainerOps,
void *DeserializationListener, bool OwnDeserializationListener,
@@ -413,7 +413,7 @@ IntrusiveRefCntPtr<ASTReader> CompilerInstance::createPCHExternalASTSource(
HeaderSearchOptions &HSOpts = PP.getHeaderSearchInfo().getHeaderSearchOpts();
IntrusiveRefCntPtr<ASTReader> Reader(new ASTReader(
- PP, Context, PCHContainerOps, Sysroot.empty() ? "" : Sysroot.c_str(),
+ PP, Context, PCHContainerOps, Sysroot.empty() ? "" : Sysroot.data(),
DisablePCHValidation, AllowPCHWithCompilerErrors,
/*AllowConfigurationMismatch*/ false, HSOpts.ModulesValidateSystemHeaders,
UseGlobalModuleIndex));
@@ -502,7 +502,7 @@ void CompilerInstance::createFrontendTimer() {
CodeCompleteConsumer *
CompilerInstance::createCodeCompletionConsumer(Preprocessor &PP,
- const std::string &Filename,
+ StringRef Filename,
unsigned Line,
unsigned Column,
const CodeCompleteOptions &Opts,