mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[frontend] Enhance CompilerInvocation to accept an array of extra arguments to pass to the clang importer.
Swift SVN r8175
This commit is contained in:
@@ -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});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user