diff options
| author | Artyom Skrobov <Artyom.Skrobov@arm.com> | 2013-12-13 13:43:48 +0000 |
|---|---|---|
| committer | Artyom Skrobov <Artyom.Skrobov@arm.com> | 2013-12-13 13:43:48 +0000 |
| commit | 025b9aae94116d3e23604d0f3cd85bcce8e085b9 (patch) | |
| tree | c3d44e03e4c4156d63ddaf1a588106663663a0d9 /lib/Tooling/CompilationDatabase.cpp | |
| parent | cd2f1e9e66325ed120df16a48aefd83f3a187311 (diff) | |
| download | clang-025b9aae94116d3e23604d0f3cd85bcce8e085b9.tar.gz clang-025b9aae94116d3e23604d0f3cd85bcce8e085b9.tar.bz2 clang-025b9aae94116d3e23604d0f3cd85bcce8e085b9.tar.xz | |
clang-check to ignore -no-integrated-as because certain drivers can't handle it
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197229 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Tooling/CompilationDatabase.cpp')
| -rw-r--r-- | lib/Tooling/CompilationDatabase.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Tooling/CompilationDatabase.cpp b/lib/Tooling/CompilationDatabase.cpp index 286beb7ae2..7bbae12dbf 100644 --- a/lib/Tooling/CompilationDatabase.cpp +++ b/lib/Tooling/CompilationDatabase.cpp @@ -204,8 +204,8 @@ private: /// \li true if successful. /// \li false if \c Args cannot be used for compilation jobs (e.g. /// contains an option like -E or -version). -bool stripPositionalArgs(std::vector<const char *> Args, - std::vector<std::string> &Result) { +static bool stripPositionalArgs(std::vector<const char *> Args, + std::vector<std::string> &Result) { IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts = new DiagnosticOptions(); UnusedInputDiagConsumer DiagClient; DiagnosticsEngine Diagnostics( @@ -237,6 +237,10 @@ bool stripPositionalArgs(std::vector<const char *> Args, // up with no jobs but then this is the user's fault. Args.push_back("placeholder.cpp"); + // Remove -no-integrated-as; it's not used for syntax checking, + // and it confuses targets which don't support this option. + std::remove_if(Args.begin(), Args.end(), MatchesAny(std::string("no-integrated-as"))); + const OwningPtr<driver::Compilation> Compilation( NewDriver->BuildCompilation(Args)); |
