[libclc] f1888e4 - [libclc] Add some include guards and format a file
Fraser Cormack via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 4 02:37:22 PST 2024
Author: Fraser Cormack
Date: 2024-11-04T10:37:11Z
New Revision: f1888e4029ec2bf657a072518dcc1c9b461559be
URL: https://github.com/llvm/llvm-project/commit/f1888e4029ec2bf657a072518dcc1c9b461559be
DIFF: https://github.com/llvm/llvm-project/commit/f1888e4029ec2bf657a072518dcc1c9b461559be.diff
LOG: [libclc] Add some include guards and format a file
Added:
Modified:
libclc/generic/include/clc/clc.h
libclc/generic/include/clc/clcmacros.h
Removed:
################################################################################
diff --git a/libclc/generic/include/clc/clc.h b/libclc/generic/include/clc/clc.h
index 171b06ac606963..94fca681f8cdae 100644
--- a/libclc/generic/include/clc/clc.h
+++ b/libclc/generic/include/clc/clc.h
@@ -1,3 +1,6 @@
+#ifndef __CLC_CLC_H__
+#define __CLC_CLC_H__
+
#ifndef cl_clang_storage_class_specifiers
#error Implementation requires cl_clang_storage_class_specifiers extension!
#endif
@@ -286,3 +289,5 @@
#include <clc/image/image.h>
#pragma OPENCL EXTENSION all : disable
+
+#endif // __CLC_CLC_H__
diff --git a/libclc/generic/include/clc/clcmacros.h b/libclc/generic/include/clc/clcmacros.h
index 2282d361d791e6..041c1cf4243820 100644
--- a/libclc/generic/include/clc/clcmacros.h
+++ b/libclc/generic/include/clc/clcmacros.h
@@ -1,3 +1,6 @@
+#ifndef __CLC_CLCMACROS_H__
+#define __CLC_CLCMACROS_H__
+
/* 6.9 Preprocessor Directives and Macros
* Some of these are handled by clang or passed by clover */
#if __OPENCL_VERSION__ >= 110
@@ -9,10 +12,12 @@
#define CLC_VERSION_1_2 120
#endif
-#define NULL ((void*)0)
+#define NULL ((void *)0)
-#define __kernel_exec(X, typen) __kernel \
- __attribute__((work_group_size_hint(X, 1, 1))) \
- __attribute__((vec_type_hint(typen)))
+#define __kernel_exec(X, typen) \
+ __kernel __attribute__((work_group_size_hint(X, 1, 1))) \
+ __attribute__((vec_type_hint(typen)))
#define kernel_exec(X, typen) __kernel_exec(X, typen)
+
+#endif // __CLC_CLCMACROS_H__
More information about the cfe-commits
mailing list