-
Notifications
You must be signed in to change notification settings - Fork 770
[SYCL] Allow __failed_assertion to support libstdc++-11 #3774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
b3d05cd
Allow __failed_assertion to support libstdc++-11
jinge90 86c9ddb
fix clang-format
jinge90 77a7a26
Merge remote-tracking branch 'origin/sycl' into glibcxx_assert_support
jinge90 4d73ea3
Use more strict check for __failed_assertion
jinge90 67b0d84
Merge remote-tracking branch 'origin/sycl' into glibcxx_assert_support
jinge90 061ed21
check system header instead of c++config.h
jinge90 92ca818
Some minor updates
jinge90 43b12ed
Minor changes
jinge90 f5dd626
Fix clang-format
jinge90 37f4766
Add lit test
jinge90 306251f
Merge remote-tracking branch 'origin/sycl' into glibcxx_assert_support
jinge90 656fa8a
Merge remote-tracking branch 'origin/sycl' into glibcxx_assert_support
jinge90 a8fccf0
put __failed_assertion lit tests into a single one
jinge90 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
void __failed_assertion(); |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -sycl-std=2020 -verify -DUSR -fsyntax-only %s | ||
// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -sycl-std=2020 -verify -fsyntax-only %s | ||
// UNSUPPORTED: system-windows | ||
// This test checks that an undefined "__failed_assertion" without SYCL_EXTERNAL will lead to SYCL sema check | ||
// failure if it is not declared in a system header otherwise no SYCL sema check failure will be triggered. | ||
|
||
#include "sycl.hpp" | ||
#ifdef USR | ||
void __failed_assertion(); | ||
// expected-note@-1 {{'__failed_assertion' declared here}} | ||
#else | ||
#include <dummy_failed_assert> | ||
#endif | ||
|
||
#ifdef USR | ||
SYCL_EXTERNAL | ||
void call_failed_assertion() { | ||
// expected-note@-1 {{called by 'call_failed_assertion'}} | ||
__failed_assertion(); | ||
// expected-error@-1 {{SYCL kernel cannot call an undefined function without SYCL_EXTERNAL attribute}} | ||
} | ||
#else | ||
// expected-no-diagnostics | ||
SYCL_EXTERNAL | ||
void call_failed_assertion() { | ||
__failed_assertion(); | ||
} | ||
#endif | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.