File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -6037,6 +6037,9 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) {
6037
6037
// File-scope asm is ignored during device-side OpenMP compilation.
6038
6038
if (LangOpts.OpenMPIsDevice )
6039
6039
break ;
6040
+ // File-scope asm is ignored during device-side SYCL compilation.
6041
+ if (LangOpts.SYCLIsDevice )
6042
+ break ;
6040
6043
auto *AD = cast<FileScopeAsmDecl>(D);
6041
6044
getModule ().appendModuleInlineAsm (AD->getAsmString ()->getString ());
6042
6045
break ;
Original file line number Diff line number Diff line change
1
+ // RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s
2
+ //
3
+ // Check that file-scope asm is ignored during device-side SYCL compilation.
4
+ //
5
+ // CHECK-NOT: module asm "foo"
6
+ __asm__("foo" );
You can’t perform that action at this time.
0 commit comments