Skip to content

Commit

Permalink
[Support] Drop verbose _ATTRIBUTE from LLVM_ATTRIBUTE_{READONLY,READN…
Browse files Browse the repository at this point in the history
…ONE} macro

names.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152413 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
ddunbar committed Mar 9, 2012
1 parent 89d8139 commit 75c0d8e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion include/llvm/Function.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class Function : public GlobalValue,
/// The particular intrinsic functions which correspond to this value are
/// defined in llvm/Intrinsics.h.
///
unsigned getIntrinsicID() const LLVM_ATTRIBUTE_READONLY;
unsigned getIntrinsicID() const LLVM_READONLY;
bool isIntrinsic() const { return getIntrinsicID() != 0; }

/// getCallingConv()/setCallingConv(CC) - These method get and set the
Expand Down
18 changes: 9 additions & 9 deletions include/llvm/Support/Compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,22 @@
#define LLVM_ATTRIBUTE_UNUSED
#endif

#ifdef __GNUC__ // aka 'ATTRIBUTE_CONST' but following LLVM Conventions.
#define LLVM_ATTRIBUTE_READNONE __attribute__((__const__))
#if (__GNUC__ >= 4) && !defined(__MINGW32__) && !defined(__CYGWIN__)
#define LLVM_ATTRIBUTE_WEAK __attribute__((__weak__))
#else
#define LLVM_ATTRIBUTE_READNONE
#define LLVM_ATTRIBUTE_WEAK
#endif

#ifdef __GNUC__ // aka 'ATTRIBUTE_PURE' but following LLVM Conventions.
#define LLVM_ATTRIBUTE_READONLY __attribute__((__pure__))
#ifdef __GNUC__ // aka 'CONST' but following LLVM Conventions.
#define LLVM_READNONE __attribute__((__const__))
#else
#define LLVM_ATTRIBUTE_READONLY
#define LLVM_READNONE
#endif

#if (__GNUC__ >= 4) && !defined(__MINGW32__) && !defined(__CYGWIN__)
#define LLVM_ATTRIBUTE_WEAK __attribute__((__weak__))
#ifdef __GNUC__ // aka 'PURE' but following LLVM Conventions.
#define LLVM_READONLY __attribute__((__pure__))
#else
#define LLVM_ATTRIBUTE_WEAK
#define LLVM_READONLY
#endif

#if (__GNUC__ >= 4)
Expand Down

0 comments on commit 75c0d8e

Please sign in to comment.