Skip to content
  1. Jul 19, 2007
  2. Jul 18, 2007
  3. Jul 17, 2007
    • Bill Wendling's avatar
      Return the correct type from isReferenceType(). · ee673372
      Bill Wendling authored
      llvm-svn: 39956
      ee673372
    • Bill Wendling's avatar
      Change dyn_cast for reference types to be more like pointers and not need the... · 354fb267
      Bill Wendling authored
      Change dyn_cast for reference types to be more like pointers and not need the canonical type. Also fix so that we're not expecting a return value from a void function
      
      llvm-svn: 39954
      354fb267
    • Bill Wendling's avatar
      Fix references: · dfc81071
      Bill Wendling authored
          According to the spec (C++ 5p6[expr]), we need to adjust "T&" to
          "T" before further analysis. We do this via the "implicit cast"
          thingy.
      
      llvm-svn: 39953
      dfc81071
    • Chris Lattner's avatar
      In the final step for preserving typedef info better in the AST, upgrade · 96d423ef
      Chris Lattner authored
      isPointerType and isVectorType to only look through a single level of typedef
      when one is present.  For this invalid code:
      
      typedef float float4 __attribute__((vector_size(16)));
      typedef int int4 __attribute__((vector_size(16)));
      typedef int4* int4p;
      void test(float4 a, int4p result, int i) {
          result[i] = a;
      }
      
      we now get:
      
      t.c:5:15: error: incompatible types assigning 'float4' to 'int4'
          result[i] = a;
          ~~~~~~~~~ ^ ~
      
      instead of:
      
      t.c:5:15: error: incompatible types assigning 'float4' to 'int  __attribute__((vector_size(16)))'
          result[i] = a;
          ~~~~~~~~~ ^ ~
      
      The rest of the type predicates should be upgraded to do the same thing.
      
      llvm-svn: 39932
      96d423ef
  4. Jul 16, 2007
  5. Jul 15, 2007
    • Steve Naroff's avatar
      · 81569d20
      Steve Naroff authored
      This is the final step/commit for implementing exlicit implicit casts. Unlike the 
      previous two checkins, which involved lot's of tedious refactoring, this checkin is nice and clean:-)
      
      - Hacked UsualUnaryConversions, UsualArithmeticConversions, and DefaultFunctionArrayConversion
      to create the AST node (using a helper function promoteExprToType).
      - Added a setType method to Expr.
      - Changed Expr::isIntegerConstantExpr to allow for the new node.
      
      llvm-svn: 39866
      81569d20
  6. Jul 14, 2007
  7. Jul 13, 2007
    • Chris Lattner's avatar
      remove some extraneous spaces, no functionality change. · 2ce5dd4c
      Chris Lattner authored
      llvm-svn: 39832
      2ce5dd4c
    • Steve Naroff's avatar
      · 7a5af782
      Steve Naroff authored
      Add (explicit) AST support for implicit casts. This should simplify the 
      code generator. Source translation tools can simply ignore this node.
      
      - Added a new Expr node, ImplicitCastExpr.
      - Changed UsualUnaryConversions/UsualArithmeticConversions to take references 
      to Expr *'s. This will allow these routines to instantiate the new AST node
      and pass it back.
      - Changed all clients of UsualUnary/UsualArithmetic (lot's of diff's).
      - Changed some names in CheckConditionalOperands. Several variables where
      only distinguished by their case (e.g. Cond, cond). Yuck (what was I thinking).
      - Removed an old/crufty constructor in CastExpr (cleanup).
      
      This check-in does not actually create the new AST node. I wanted to separate
      the mechanical changes from the semantic changes. In addition, I need to 
      coordinate with Chris, since the semantic change will break the code generator.
      
      llvm-svn: 39814
      7a5af782
    • Chris Lattner's avatar
      "Codegen for Character Literals and Conditional Operator · 6e9d9b35
      Chris Lattner authored
      Both in one patch, and the test case that Chris didn't commit last
      time is in there too...
      
      I'll split the patch up if somebody wants it split."
      
      Patch by Keith Bauer.
      
      llvm-svn: 39796
      6e9d9b35
    • Chris Lattner's avatar
      Implement codegen for + and - with pointers. Patch contributed by · d2b88ab3
      Chris Lattner authored
      Keith Bauer.
      
      llvm-svn: 39793
      d2b88ab3
    • Anton Korobeynikov's avatar
      Workaround gcc 3.4.x bug · b6719478
      Anton Korobeynikov authored
      llvm-svn: 39792
      b6719478
  8. Jul 12, 2007
  9. Jul 11, 2007
    • Steve Naroff's avatar
      Bug #: · b207d6be
      Steve Naroff authored
      Submitted by:
      Reviewed by:
      Removed Attr.[h,cpp]...they didn't have any useful content.
      
      When more (GCC) attributes are added, we might want to create a file
      of this ilk. For now, it's better to remove them (to eliminate any confusion).
      
      I also update the Xcode project file...
      
      llvm-svn: 39729
      b207d6be
    • Steve Naroff's avatar
      Bug #: · e728ba35
      Steve Naroff authored
      Submitted by:
      Reviewed by:
      Two vector fixes:
      
      - Sema::CheckAssignmentConstraints() needs to compare the canonical type.
      - Expr::isLvalue() needs to disallow subscripting into a vector returned by a function. This
      follows the rules for struct returns (in C, at least...C++ is another story:-)
      
      Here is an example...
      
      float4 float4_return()
      {
          float4 xx;
      
          return xx;
      }
      void add_float4_void_return(float4 *a, float4 *b, float4 *result)
      {
          float f;
          float4_return()[1] = f; // now illegal
      }
      
      llvm-svn: 39728
      e728ba35
  10. Jul 09, 2007
    • Steve Naroff's avatar
      Bug #: · 84ff4b44
      Steve Naroff authored
      Submitted by:
      Reviewed by:
      Typechecking support for vectors...
      
      - Added CheckVectorOperands(). Called from CheckAdditionOperands,
      CheckMultiplyDivideOperands, CheckSubstractionOperands, and CheckBitwiseOperands.
      - Added diagnostic for converting vector values of different size.
      - Modified Type::isArithmeticType to include vectors.
      
      Sould be ready for Chris to add code generation. I will continue testing/refining.
      
      llvm-svn: 39717
      84ff4b44
  11. Jul 07, 2007
    • Steve Naroff's avatar
      Bug #: · 4ae0ac6a
      Steve Naroff authored
      Submitted by:
      Reviewed by:
      - Finished semantic analysis for vectors, added some diagnostics.
      - Added AST for vectors (instantiation, installation into the decl).
      - Fixed bug in ParseArraySubscriptExpr()...this crasher was introduced by me
      when we added the range support.
      - Turned pedantic off by default. Since vectors are gcc extensions, having
      pedantic on by default was annoying. Turning it off by default is  also
      consistent with gcc (but this wasn't my primary motivation).
      - Tweaked some comments and diagnostics.
      
      Note: The type checking code is still under construction (for vectors). This
      will be my next check-in.
      
      llvm-svn: 39715
      4ae0ac6a
  12. Jun 27, 2007
Loading