[cfe-commits] r152430 - /cfe/trunk/include/clang/AST/ASTContext.h
Daniel Dunbar
daniel at zuster.org
Fri Mar 9 12:02:54 PST 2012
Author: ddunbar
Date: Fri Mar 9 14:02:54 2012
New Revision: 152430
URL: http://llvm.org/viewvc/llvm-project?rev=152430&view=rev
Log:
[AST] Mark ASTContext::getTypeInfo and some friends as LLVM_READONLY.
Modified:
cfe/trunk/include/clang/AST/ASTContext.h
Modified: cfe/trunk/include/clang/AST/ASTContext.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTContext.h?rev=152430&r1=152429&r2=152430&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/ASTContext.h (original)
+++ cfe/trunk/include/clang/AST/ASTContext.h Fri Mar 9 14:02:54 2012
@@ -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 @@
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 @@
/// 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 @@
// 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
More information about the cfe-commits
mailing list