Skip to content

Commit 91dbbfc

Browse files
committed
Also disabel alwasyinline for SYCL device
1 parent 2736632 commit 91dbbfc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

clang/lib/CodeGen/CodeGenModule.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6900,6 +6900,7 @@ void CodeGenModule::EmitGlobalFunctionDefinition(GlobalDecl GD,
69006900
!D->hasAttr<NoInlineAttr>() &&
69016901
!Fn->hasFnAttribute(llvm::Attribute::NoInline) &&
69026902
!D->hasAttr<OptimizeNoneAttr>() && !LangOpts.SYCLIsNativeCPU &&
6903+
!LangOpts.SYCLIsDevice &&
69036904
!Fn->hasFnAttribute(llvm::Attribute::OptimizeNone) &&
69046905
!ShouldAddOptNone) {
69056906
Fn->addFnAttr(llvm::Attribute::AlwaysInline);

0 commit comments

Comments
 (0)