diff options
author | Yaron Keren <yaron.keren@gmail.com> | 2015-07-06 08:47:15 +0000 |
---|---|---|
committer | Yaron Keren <yaron.keren@gmail.com> | 2015-07-06 08:47:15 +0000 |
commit | 5b816061ba9294b8aeabc5d22eb87978ca0015bc (patch) | |
tree | 864160520b293956b3039b503aa9e5d8700f914b /clang/lib/Frontend/CompilerInstance.cpp | |
parent | 763a38a80c6d09ad741bb2892cd4d8c763f6416c (diff) | |
download | bcm5719-llvm-5b816061ba9294b8aeabc5d22eb87978ca0015bc.tar.gz bcm5719-llvm-5b816061ba9294b8aeabc5d22eb87978ca0015bc.zip |
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: 241433
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index 6b0fed67618..f42198df4f8 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, |