[all-commits] [llvm/llvm-project] 2753ea: [Clang] Fix the new driver crashing when using '-f...
Joseph Huber via All-commits
all-commits at lists.llvm.org
Tue Sep 6 17:50:08 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2753eafe5a7f003776b12f425c5b0a475e8fb6b7
https://github.com/llvm/llvm-project/commit/2753eafe5a7f003776b12f425c5b0a475e8fb6b7
Author: Joseph Huber <jhuber6 at vols.utk.edu>
Date: 2022-09-06 (Tue, 06 Sep 2022)
Changed paths:
M clang/lib/Driver/Driver.cpp
M clang/lib/Driver/ToolChains/Clang.cpp
M clang/test/Driver/cuda-bindings.cu
M clang/test/Driver/hip-binding.hip
M clang/test/Driver/openmp-offload.c
Log Message:
-----------
[Clang] Fix the new driver crashing when using '-fsyntax-only'
The new driver currently crashses when attempting to use the
'-fsyntax-only' option. This is because the option causes all output to
be given the `TY_Nothing' type which should signal the end of the
pipeline. The new driver was not treating this correctly and attempting
to use empty input. This patch fixes the handling so we do not attempt
to continue when the input is nothing.
One concession is that we must now check when generating the arguments
for Clang if the input is of 'TY_Nothing'. This is because the new
driver will only create code if the device code is a dependency on the
host, creating the output without the dependency would require a
complete rewrite of the logic as we do not maintain any state between
calls to 'BuildOffloadingActions' so I believe this is the most
straightforward method.
Reviewed By: tra
Differential Revision: https://reviews.llvm.org/D133161
More information about the All-commits
mailing list