[frontend] Introduce CompilerInvocation::setRuntimeIncludePath()

Also have CompilerInvocation store the RuntimeIncludePath and calculate it via the MainExecutablePath
instead of the other way around (store MainExecutablePath and calculate RuntimeIncludePath when requested)

Swift SVN r7170
This commit is contained in:
Argyrios Kyrtzidis
2013-08-12 19:20:21 +00:00
parent ae67a7719a
commit d57a6a18f0
2 changed files with 11 additions and 7 deletions

View File

@@ -41,7 +41,7 @@ class CompilerInvocation {
std::string ClangModuleCachePath;
std::vector<std::string> ImportSearchPaths;
std::vector<std::string> FrameworkSearchPaths;
std::string MainExecutablePath;
std::string RuntimeIncludePath;
std::string SDKPath;
LangOptions LangOpts;
@@ -103,11 +103,15 @@ public:
return FrameworkSearchPaths;
}
void setMainExecutablePath(const std::string &Path) {
MainExecutablePath = Path;
void setMainExecutablePath(StringRef Path);
void setRuntimeIncludePath(StringRef Path) {
RuntimeIncludePath = Path;
}
std::string getRuntimeIncludePath() const;
StringRef getRuntimeIncludePath() const {
return RuntimeIncludePath;
}
void setSDKPath(const std::string &Path) {
// Capture the clang importer entrypoint here, so that clients that don't