Hahnfeld accepted this revision. Hahnfeld added a comment. This revision is now accepted and ready to land.
LGTM ================ Comment at: lib/Driver/ToolChains/Clang.cpp:1967-1968 + C.getSingleOffloadToolChain<Action::OFK_Host>() + ->getTriple() + .normalize(); + CmdArgs.push_back("-aux-triple"); ---------------- I might be wrong here... Can you run the code through `clang-format` before committing to be sure? ================ Comment at: lib/Frontend/CompilerInstance.cpp:914-915 + // Create TargetInfo for the other side of CUDA and OpenMP compilation. + if ((getLangOpts().CUDA && !getFrontendOpts().AuxTriple.empty()) || + (getLangOpts().OpenMPIsDevice && !getFrontendOpts().AuxTriple.empty())) { auto TO = std::make_shared<TargetOptions>(); ---------------- ABataev wrote: > It's better to check `!getFrontendOpts().AuxTriple.empty()` only once in this > condition Another micro optimization: `(getLangOpts().CUDA || getLangOpts().OpenMPIsDevice)` is probably cheaper than `!getFrontendOpts().AuxTriple.empty()` so it might be worth swapping the conditions as in the original code. Repository: rL LLVM https://reviews.llvm.org/D29339 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits