Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
Showing
5 changed files
with
52 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters