From: Michael Liao Date: Thu, 10 Oct 2019 23:45:20 +0000 (+0000) Subject: [tooling] Fix assertion on MacOSX. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e4a195cf1a256ffd6a60e3256e84e551a303c708;p=clang [tooling] Fix assertion on MacOSX. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@374478 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Tooling/Tooling.cpp b/lib/Tooling/Tooling.cpp index 254cc8b7e8..60d4dce0cb 100644 --- a/lib/Tooling/Tooling.cpp +++ b/lib/Tooling/Tooling.cpp @@ -106,7 +106,12 @@ static const llvm::opt::ArgStringList *getCC1Arguments( // compilation, device compilation only option, such as // `--cuda-device-only`, needs specifying. assert(Actions.size() == 2); - assert(isa(Actions.front())); + assert( + isa(Actions.front()) || + // On MacOSX real actions may end up being wrapped in + // BindArchAction. + (isa(Actions.front()) && + isa(*Actions.front()->input_begin()))); OffloadCompilation = true; break; }