[cfe-commits] r39358 - in /cfe/cfe/trunk: AST/Builtins.cpp AST/Type.cpp include/clang/AST/Builtins.def include/clang/AST/Type.h include/clang/Parse/DeclSpec.h

snaroff at cs.uiuc.edu snaroff at cs.uiuc.edu
Wed Jul 11 09:43:34 PDT 2007


Author: snaroff
Date: Wed Jul 11 11:43:34 2007
New Revision: 39358

URL: http://llvm.org/viewvc/llvm-project?rev=39358&view=rev
Log:
Bug #:
Submitted by:
Reviewed by:
Down to 0 warning/errors for Carbon.h. Also made a couple trivial name
changes...

Modified:
    cfe/cfe/trunk/AST/Builtins.cpp
    cfe/cfe/trunk/AST/Type.cpp
    cfe/cfe/trunk/include/clang/AST/Builtins.def
    cfe/cfe/trunk/include/clang/AST/Type.h
    cfe/cfe/trunk/include/clang/Parse/DeclSpec.h

Modified: cfe/cfe/trunk/AST/Builtins.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/AST/Builtins.cpp?rev=39358&r1=39357&r2=39358&view=diff

==============================================================================
--- cfe/cfe/trunk/AST/Builtins.cpp (original)
+++ cfe/cfe/trunk/AST/Builtins.cpp Wed Jul 11 11:43:34 2007
@@ -99,6 +99,11 @@
     if (Long)
       return Context.LongDoubleTy;
     return Context.DoubleTy;
+  case 's':
+    assert(!LongLong && "Bad modifiers used with 's'!");
+    if (Unsigned)
+      return Context.UnsignedShortTy;
+    return Context.ShortTy;
   //case 'i':
   }
 }

Modified: cfe/cfe/trunk/AST/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/AST/Type.cpp?rev=39358&r1=39357&r2=39358&view=diff

==============================================================================
--- cfe/cfe/trunk/AST/Type.cpp (original)
+++ cfe/cfe/trunk/AST/Type.cpp Wed Jul 11 11:43:34 2007
@@ -50,7 +50,7 @@
     // - Forward declarations (extern int matrix[][7]).
     // - The last component of a structure (flexible array idiom).
     // Clients of this routine will need to determine if the size is required.
-    return cast<ArrayType>(this)->getSizeExpression() == 0;
+    return cast<ArrayType>(this)->getSize() == 0;
   }
 }
 

Modified: cfe/cfe/trunk/include/clang/AST/Builtins.def
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/AST/Builtins.def?rev=39358&r1=39357&r2=39358&view=diff

==============================================================================
--- cfe/cfe/trunk/include/clang/AST/Builtins.def (original)
+++ cfe/cfe/trunk/include/clang/AST/Builtins.def Wed Jul 11 11:43:34 2007
@@ -48,5 +48,6 @@
 BUILTIN(__builtin_fabs , "dd"  , "nc")
 BUILTIN(__builtin_fabsf, "ff"  , "nc")
 BUILTIN(__builtin_fabsl, "LdLd", "nc")
+BUILTIN(__builtin_constant_p, "UsUs", "nc")
 
 #undef BUILTIN

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

==============================================================================
--- cfe/cfe/trunk/include/clang/AST/Type.h (original)
+++ cfe/cfe/trunk/include/clang/AST/Type.h Wed Jul 11 11:43:34 2007
@@ -281,13 +281,13 @@
   TypeRef getElementType() const { return ElementType; }
   ArraySizeModifier getSizeModifier() const { return SizeModifier; }
   unsigned getIndexTypeQualifier() const { return IndexTypeQuals; }
-  Expr *getSizeExpression() const { return SizeExpr; }
+  Expr *getSize() const { return SizeExpr; }
   
   virtual void getAsString(std::string &InnerString) const;
   
   void Profile(FoldingSetNodeID &ID) {
     Profile(ID, getSizeModifier(), getIndexTypeQualifier(), getElementType(),
-            getSizeExpression());
+            getSize());
   }
   static void Profile(FoldingSetNodeID &ID, ArraySizeModifier SizeModifier,
                       unsigned IndexTypeQuals, TypeRef ElementType,

Modified: cfe/cfe/trunk/include/clang/Parse/DeclSpec.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/Parse/DeclSpec.h?rev=39358&r1=39357&r2=39358&view=diff

==============================================================================
--- cfe/cfe/trunk/include/clang/Parse/DeclSpec.h (original)
+++ cfe/cfe/trunk/include/clang/Parse/DeclSpec.h Wed Jul 11 11:43:34 2007
@@ -255,7 +255,7 @@
     /// This is the size of the array, or null if [] or [*] was specified.
     /// Since the parser is multi-purpose, and we don't want to impose a root
     /// expression class on all clients, NumElts is untyped.
-    void *NumElts;
+    Action::ExprTy *NumElts;
     void destroy() {}
   };
   





More information about the cfe-commits mailing list