mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 05:50:11 +01:00
util: Disable usage of __attribute__((__const__)) when the compiler is clang
Clang didn't implement __attribute__((__const__)) properly for release build. The issue tracker is: https://github.com/llvm/llvm-project/issues/56993 Closes #6781 Closes #6782 Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18039>
This commit is contained in:
parent
075b72ea06
commit
1f05b23b4f
1 changed files with 1 additions and 1 deletions
|
|
@ -140,7 +140,7 @@ do { \
|
|||
* value. As a result, calls to it can be CSEed. Note that using memory
|
||||
* pointed to by the arguments is not allowed for const functions.
|
||||
*/
|
||||
#ifdef HAVE_FUNC_ATTRIBUTE_CONST
|
||||
#if !defined(__clang__) && defined(HAVE_FUNC_ATTRIBUTE_CONST)
|
||||
#define ATTRIBUTE_CONST __attribute__((__const__))
|
||||
#else
|
||||
#define ATTRIBUTE_CONST
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue