aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/FrontendActions.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-07-22 16:35:34 +0000
committerDouglas Gregor <dgregor@apple.com>2011-07-22 16:35:34 +0000
commit832d620b4ae0fc5fe28561b885b4cfc65cf5c9ab (patch)
tree499c921a0e163c0aaf47afc091a045a13556f64c /lib/Frontend/FrontendActions.cpp
parent72a9ae18553bf8b6bdad84d2c54f73741a47e275 (diff)
Switch all of the "isysroot" const char*'s throughout the AST reader
and writer to StringRef or std::string, as appropriate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135769 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/FrontendActions.cpp')
-rw-r--r--lib/Frontend/FrontendActions.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Frontend/FrontendActions.cpp b/lib/Frontend/FrontendActions.cpp
index 7b06c7e49a..342a4c2465 100644
--- a/lib/Frontend/FrontendActions.cpp
+++ b/lib/Frontend/FrontendActions.cpp
@@ -82,9 +82,10 @@ ASTConsumer *GeneratePCHAction::CreateASTConsumer(CompilerInstance &CI,
if (ComputeASTConsumerArguments(CI, InFile, Sysroot, OutputFile, OS, Chaining))
return 0;
- const char *isysroot = CI.getFrontendOpts().RelocatablePCH ?
- Sysroot.c_str() : 0;
- return new PCHGenerator(CI.getPreprocessor(), OutputFile, Chaining, isysroot, OS);
+ if (!CI.getFrontendOpts().RelocatablePCH)
+ Sysroot.clear();
+ return new PCHGenerator(CI.getPreprocessor(), OutputFile, Chaining, Sysroot,
+ OS);
}
bool GeneratePCHAction::ComputeASTConsumerArguments(CompilerInstance &CI,