summaryrefslogtreecommitdiffstats
path: root/kernel/include/linux/compiler-clang.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/include/linux/compiler-clang.h')
-rw-r--r--kernel/include/linux/compiler-clang.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/include/linux/compiler-clang.h b/kernel/include/linux/compiler-clang.h
new file mode 100644
index 000000000..d1e49d52b
--- /dev/null
+++ b/kernel/include/linux/compiler-clang.h
@@ -0,0 +1,12 @@
+#ifndef __LINUX_COMPILER_H
+#error "Please don't include <linux/compiler-clang.h> directly, include <linux/compiler.h> instead."
+#endif
+
+/* Some compiler specific definitions are overwritten here
+ * for Clang compiler
+ */
+
+#ifdef uninitialized_var
+#undef uninitialized_var
+#define uninitialized_var(x) x = *(&(x))
+#endif