diff options
| author | Artur Gainullin <artur.gainullin@intel.com> | 2021-02-11 12:54:59 -0800 |
|---|---|---|
| committer | Artur Gainullin <artur.gainullin@intel.com> | 2021-02-12 17:00:45 -0800 |
| commit | ff50b121e336503621da80676116f82d82e91196 (patch) | |
| tree | 18db8bf57ac9be90cb5b54c0c0d13455e5d05164 /clang/lib/CodeGen/CodeGenModule.cpp | |
| parent | 982b891905349e9d6b82f8d89d325b6f2e838435 (diff) | |
[SYCL] Ignore file-scope asm during device-side SYCL compilation.
Reviewed By: bader, eandrews
Differential Revision: https://reviews.llvm.org/D96538
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 6321f745593b..4688f13dae21 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -5672,6 +5672,9 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) { // File-scope asm is ignored during device-side OpenMP compilation. if (LangOpts.OpenMPIsDevice) break; + // File-scope asm is ignored during device-side SYCL compilation. + if (LangOpts.SYCLIsDevice) + break; auto *AD = cast<FileScopeAsmDecl>(D); getModule().appendModuleInlineAsm(AD->getAsmString()->getString()); break; |
