[libclc] [NFC][libclc] Refactor _CLC_*_VECTORIZE macros to functions in .inc files (PR #145678)

Fraser Cormack via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 25 06:00:30 PDT 2025


================
@@ -0,0 +1,121 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include <clc/utils.h>
+
+#if __CLC_VECSIZE_OR_1 == 1
+
+#ifndef __IMPL_FUNCTION
+#define __IMPL_FUNCTION FUNCTION
+#endif
+
+#ifndef __CLC_DEF_SPEC
+#define __CLC_DEF_SPEC _CLC_DEF
----------------
frasercrmck wrote:

I like this idea. We should probably extend this to the existing gentype helpers (in another PR) so there's always control over the def spec.

https://github.com/llvm/llvm-project/pull/145678


More information about the cfe-commits mailing list