Fix test from #203165 when no wasm target is configured#205722
Conversation
|
@llvm/pr-subscribers-backend-webassembly @llvm/pr-subscribers-clang Author: Derek Schuff (dschuff) Changes
Full diff: https://github.com/llvm/llvm-project/pull/205722.diff 1 Files Affected:
diff --git a/clang/test/CodeGen/WebAssembly/wasm-funcref-to-ptr-error.c b/clang/test/CodeGen/WebAssembly/wasm-funcref-to-ptr-error.c
index ce663a70dd3b1..6924238cab01f 100644
--- a/clang/test/CodeGen/WebAssembly/wasm-funcref-to-ptr-error.c
+++ b/clang/test/CodeGen/WebAssembly/wasm-funcref-to-ptr-error.c
@@ -1,3 +1,4 @@
+// REQUIRES: webassembly-registered-target
// RUN: not %clang_cc1 -triple wasm32 -target-feature +reference-types -S -o /dev/null %s 2>&1 | FileCheck %s
// RUN: not %clang_cc1 -triple wasm64 -target-feature +reference-types -S -o /dev/null %s 2>&1 | FileCheck %s
|
|
Yeah. Seems right. My first reaction when I saw the error.
Probably cause actually emitting -S (go through backend). (p.s., was the review request an accident?) |
|
Yes, tests that only emit LLVM IR don't need the backend configured (all the targets are builtin to clang regardless). Generally speaking if you can get away with using IR instead of going end-to-end in clang tests you should; this one is a little special since it tests the backend error (although arguably we could maybe even use a backend test that starts with LLVM IR). The review request was intentional. Generally we should be doing pre-commit review for everything, but small fix-forward cases like this are common in LLVM. Even for those we should be doing post-commit review though. (Probably even better would be to always just revert and reapply later rather than fixing forward; in Chromium that's basically always how it's done. But human nature being what it is, even people who know better will often end up doing the easier thing if it's allowed and common :D ) |
Fix test from #203165 when no wasm target is configured