================
@@ -1223,9 +1223,10 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, 
QualType RetTy,
   if (getLangOpts().OpenMP && CurCodeDecl)
     CGM.getOpenMPRuntime().emitFunctionProlog(*this, CurCodeDecl);
 
-  // Handle emitting HLSL entry functions.
-  if (D && D->hasAttr<HLSLShaderAttr>())
-    CGM.getHLSLRuntime().emitEntryFunction(FD, Fn);
+  // Emit HLSL specific initialization
+  if (getLangOpts().HLSL) {
+    CGM.getHLSLRuntime().emitFunctionProlog(FD, Fn);
+  }
----------------
python3kgae wrote:

```suggestion
  if (getLangOpts().HLSL)
    CGM.getHLSLRuntime().emitFunctionProlog(FD, Fn);
```

https://github.com/llvm/llvm-project/pull/95331
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to