[cfe-commits] r69578 - in /cfe/trunk: include/clang/AST/ASTContext.h lib/AST/ASTContext.cpp

Daniel Dunbar daniel at zuster.org
Sun Apr 19 23:37:24 PDT 2009


Author: ddunbar
Date: Mon Apr 20 01:37:24 2009
New Revision: 69578

URL: http://llvm.org/viewvc/llvm-project?rev=69578&view=rev
Log:
Make FieldDecl parameter to getObjCEncodingForType... const.

Modified:
    cfe/trunk/include/clang/AST/ASTContext.h
    cfe/trunk/lib/AST/ASTContext.cpp

Modified: cfe/trunk/include/clang/AST/ASTContext.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTContext.h?rev=69578&r1=69577&r2=69578&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/ASTContext.h (original)
+++ cfe/trunk/include/clang/AST/ASTContext.h Mon Apr 20 01:37:24 2009
@@ -378,7 +378,7 @@
   /// 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 @@
   void getObjCEncodingForTypeImpl(QualType t, std::string &S, 
                                   bool ExpandPointedToStructures,
                                   bool ExpandStructures,
-                                  FieldDecl *Field,
+                                  const FieldDecl *Field,
                                   bool OutermostType = false,
                                   bool EncodingProperty = false);
                                   

Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=69578&r1=69577&r2=69578&view=diff

==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Mon Apr 20 01:37:24 2009
@@ -2166,7 +2166,7 @@
   // 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::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 @@
 }
 
 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 @@
 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()) {





More information about the cfe-commits mailing list