diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2012-03-09 20:02:54 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2012-03-09 20:02:54 +0000 |
| commit | b150e1b1af683b63477c7ebc7b361447b1d5d0c3 (patch) | |
| tree | 8c076ebd3b01c4e207371f332123e3777cf46efd | |
| parent | 0fbc2bd499e6eabe774e93df3f0ae8225e1a7ec6 (diff) | |
| download | bcm5719-llvm-b150e1b1af683b63477c7ebc7b361447b1d5d0c3.tar.gz bcm5719-llvm-b150e1b1af683b63477c7ebc7b361447b1d5d0c3.zip | |
[AST] Mark ASTContext::getTypeInfo and some friends as LLVM_READONLY.
llvm-svn: 152430
| -rw-r--r-- | clang/include/clang/AST/ASTContext.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/include/clang/AST/ASTContext.h b/clang/include/clang/AST/ASTContext.h index 425ee3cdb23..ab1e52d255c 100644 --- a/clang/include/clang/AST/ASTContext.h +++ b/clang/include/clang/AST/ASTContext.h @@ -34,6 +34,7 @@ #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/TinyPtrVector.h" #include "llvm/Support/Allocator.h" +#include "llvm/Support/Compiler.h" #include <vector> namespace llvm { @@ -1225,7 +1226,8 @@ public: private: CanQualType getFromTargetType(unsigned Type) const; - std::pair<uint64_t, unsigned> getTypeInfoImpl(const Type *T) const; + std::pair<uint64_t, unsigned> + getTypeInfoImpl(const Type *T) const LLVM_READONLY; //===--------------------------------------------------------------------===// // Type Predicates. @@ -1259,8 +1261,8 @@ public: /// getTypeInfo - Get the size and alignment of the specified complete type in /// bits. - std::pair<uint64_t, unsigned> getTypeInfo(const Type *T) const; - std::pair<uint64_t, unsigned> getTypeInfo(QualType T) const { + std::pair<uint64_t, unsigned> getTypeInfo(const Type *T) const LLVM_READONLY; + std::pair<uint64_t, unsigned> getTypeInfo(QualType T) const LLVM_READONLY { return getTypeInfo(T.getTypePtr()); } @@ -1661,7 +1663,7 @@ public: // The width of an integer, as defined in C99 6.2.6.2. This is the number // of bits in an integer type excluding any padding bits. - unsigned getIntWidth(QualType T) const; + unsigned getIntWidth(QualType T) const LLVM_READONLY; // Per C99 6.2.5p6, for every signed integer type, there is a corresponding // unsigned integer type. This method takes a signed type, and returns the |

