aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-04-20 06:37:24 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-04-20 06:37:24 +0000
commit153bfe5795e2c1a5a738e73d3784964e082237fc (patch)
treecc559e4d9ba6e6e835d982313971fcf56658bf2c
parent5cbe5f9105eae5968229fa2d82fc258e61e27153 (diff)
Make FieldDecl parameter to getObjCEncodingForType... const.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69578 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/AST/ASTContext.h4
-rw-r--r--lib/AST/ASTContext.cpp8
2 files changed, 6 insertions, 6 deletions
diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h
index ee9f99c57e..2b95ac57e6 100644
--- a/include/clang/AST/ASTContext.h
+++ b/include/clang/AST/ASTContext.h
@@ -378,7 +378,7 @@ public:
/// given type into \arg S. If \arg NameFields is specified then
/// record field names are also encoded.
void getObjCEncodingForType(QualType t, std::string &S,
- FieldDecl *Field=NULL);
+ const FieldDecl *Field=0);
void getLegacyIntegralTypeEncoding(QualType &t) const;
@@ -730,7 +730,7 @@ private:
void getObjCEncodingForTypeImpl(QualType t, std::string &S,
bool ExpandPointedToStructures,
bool ExpandStructures,
- FieldDecl *Field,
+ const FieldDecl *Field,
bool OutermostType = false,
bool EncodingProperty = false);
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index 63d88b2ec7..48d9fe4ea9 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -2166,7 +2166,7 @@ void ASTContext::getObjCEncodingForPropertyDecl(const ObjCPropertyDecl *PD,
// Encode result type.
// GCC has some special rules regarding encoding of properties which
// closely resembles encoding of ivars.
- getObjCEncodingForTypeImpl(PD->getType(), S, true, true, NULL,
+ getObjCEncodingForTypeImpl(PD->getType(), S, true, true, 0,
true /* outermost type */,
true /* encoding for property */);
@@ -2227,7 +2227,7 @@ void ASTContext::getLegacyIntegralTypeEncoding (QualType &PointeeTy) const {
}
void ASTContext::getObjCEncodingForType(QualType T, std::string& S,
- FieldDecl *Field) {
+ const FieldDecl *Field) {
// We follow the behavior of gcc, expanding structures which are
// directly pointed to, and expanding embedded structures. Note that
// these rules are sufficient to prevent recursive encoding of the
@@ -2237,7 +2237,7 @@ void ASTContext::getObjCEncodingForType(QualType T, std::string& S,
}
static void EncodeBitField(const ASTContext *Context, std::string& S,
- FieldDecl *FD) {
+ const FieldDecl *FD) {
const Expr *E = FD->getBitWidth();
assert(E && "bitfield width not there - getObjCEncodingForTypeImpl");
ASTContext *Ctx = const_cast<ASTContext*>(Context);
@@ -2249,7 +2249,7 @@ static void EncodeBitField(const ASTContext *Context, std::string& S,
void ASTContext::getObjCEncodingForTypeImpl(QualType T, std::string& S,
bool ExpandPointedToStructures,
bool ExpandStructures,
- FieldDecl *FD,
+ const FieldDecl *FD,
bool OutermostType,
bool EncodingProperty) {
if (const BuiltinType *BT = T->getAsBuiltinType()) {