================
@@ -672,6 +672,12 @@ static Attr *ProcessStmtAttribute(Sema &S, Stmt *St, const 
ParsedAttr &A,
       !(A.existsInTarget(S.Context.getTargetInfo()) ||
         (S.Context.getLangOpts().SYCLIsDevice && Aux &&
          A.existsInTarget(*Aux)))) {
+    // Special case: musttail on WebAssembly without tail-call feature
+    if (A.getKind() == ParsedAttr::AT_MustTail &&
+        !S.Context.getTargetInfo().hasMustTail()) {
+      S.Diag(A.getLoc(), diag::err_wasm_musttail_unsupported);
+      return nullptr;
+    }
----------------
AaronBallman wrote:

You shouldn't need to add this code, either `existsInTarget()` (slightly above) 
will catch it, or `checkCommonAttributeFeatures()` (slightly below) will.

https://github.com/llvm/llvm-project/pull/163618
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to