mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-29 10:25:12 +00:00
Add an "ATTRIBUTE_UNUSED" macro (and use it). It's for variables which are
mainly used in debugging and/or assert situations. It should make the compiler and the static analyzer stop nagging us about them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92181 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -29,6 +29,12 @@
|
||||
#define ATTRIBUTE_USED
|
||||
#endif
|
||||
|
||||
#if (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
|
||||
#define ATTRIBUTE_UNUSED __attribute__((__unused__))
|
||||
#else
|
||||
#define ATTRIBUTE_UNUSED
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__ // aka 'ATTRIBUTE_CONST' but following LLVM Conventions.
|
||||
#define ATTRIBUTE_READNONE __attribute__((__const__))
|
||||
#else
|
||||
|
Reference in New Issue
Block a user