mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 06:30:16 +00:00
add attributes for readnone/readonly functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88862 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9806f833a6
commit
6f0c67d4ff
@ -29,6 +29,18 @@
|
||||
#define ATTRIBUTE_USED
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__ // aka 'ATTRIBUTE_CONST' but following LLVM Conventions.
|
||||
#define ATTRIBUTE_READNONE __attribute__((__const__))
|
||||
#else
|
||||
#define ATTRIBUTE_READNONE
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__ // aka 'ATTRIBUTE_PURE' but following LLVM Conventions.
|
||||
#define ATTRIBUTE_READONLY __attribute__((__pure__))
|
||||
#else
|
||||
#define ATTRIBUTE_READONLY
|
||||
#endif
|
||||
|
||||
#if (__GNUC__ >= 4)
|
||||
#define BUILTIN_EXPECT(EXPR, VALUE) __builtin_expect((EXPR), (VALUE))
|
||||
#else
|
||||
|
Loading…
x
Reference in New Issue
Block a user