Author: hliao Date: Thu Oct 10 16:45:20 2019 New Revision: 374478 URL: http://llvm.org/viewvc/llvm-project?rev=374478&view=rev Log: [tooling] Fix assertion on MacOSX.
Modified: cfe/trunk/lib/Tooling/Tooling.cpp Modified: cfe/trunk/lib/Tooling/Tooling.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/Tooling.cpp?rev=374478&r1=374477&r2=374478&view=diff ============================================================================== --- cfe/trunk/lib/Tooling/Tooling.cpp (original) +++ cfe/trunk/lib/Tooling/Tooling.cpp Thu Oct 10 16:45:20 2019 @@ -106,7 +106,12 @@ static const llvm::opt::ArgStringList *g // compilation, device compilation only option, such as // `--cuda-device-only`, needs specifying. assert(Actions.size() == 2); - assert(isa<driver::CompileJobAction>(Actions.front())); + assert( + isa<driver::CompileJobAction>(Actions.front()) || + // On MacOSX real actions may end up being wrapped in + // BindArchAction. + (isa<driver::BindArchAction>(Actions.front()) && + isa<driver::CompileJobAction>(*Actions.front()->input_begin()))); OffloadCompilation = true; break; } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits