[frontend] Enhance CompilerInvocation to accept an array of extra arguments to pass to the clang importer.

Swift SVN r8175
This commit is contained in:
Argyrios Kyrtzidis
2013-09-13 01:16:28 +00:00
parent c65f4c3f43
commit 6ee8877fbd
4 changed files with 20 additions and 5 deletions

View File

@@ -50,6 +50,7 @@ class CompilerInvocation {
SmallVector<LinkLibrary, 4> LinkLibraries;
std::string RuntimeIncludePath;
std::string SDKPath;
std::vector<std::string> ExtraClangArgs;
LangOptions LangOpts;
@@ -100,7 +101,7 @@ public:
ImportSearchPaths = Paths;
}
std::vector<std::string> getImportSearchPaths() const {
ArrayRef<std::string> getImportSearchPaths() const {
return ImportSearchPaths;
}
@@ -108,10 +109,18 @@ public:
FrameworkSearchPaths = Paths;
}
std::vector<std::string> getFrameworkSearchPaths() const {
ArrayRef<std::string> getFrameworkSearchPaths() const {
return FrameworkSearchPaths;
}
void setExtraClangArgs(const std::vector<std::string> &Args) {
ExtraClangArgs = Args;
}
ArrayRef<std::string> getExtraClangArgs() const {
return ExtraClangArgs;
}
void addLinkLibrary(StringRef name, LibraryKind kind) {
LinkLibraries.push_back({name, kind});
}