Skip to content
  1. Jul 20, 2007
    • Chris Lattner's avatar
      Reimplement SourceLocation. Instead of having a · dc5c055f
      Chris Lattner authored
      fileid/offset pair, it now contains a bit discriminating between
      mapped locations and file locations.  This separates the tables for
      macros and files in SourceManager, and allows better separation of
      concepts in the rest of the compiler.  This allows us to have *many*
      macro instantiations before running out of 'addressing space'.
      
      This is also more efficient, because testing whether something is a
      macro expansion is now a bit test instead of a table lookup (which
      also used to require having a srcmgr around, now it doesn't).
      
      This is fully functional, but there are several refinements and
      optimizations left.
      
      llvm-svn: 40103
      dc5c055f
    • Chris Lattner's avatar
  2. Jul 19, 2007
  3. Jul 18, 2007
  4. Jul 17, 2007
  5. Jul 16, 2007
    • Steve Naroff's avatar
      · 3109001c
      Steve Naroff authored
      Change DefaultFunctionArrayConversions and UsualUnaryConversions to return void. The caller 
      needs to query the expression for the type. Since both these functions guarantee the expression 
      contains a valid type, removed old/vacuous asserts (from code calling both of these routines).
      
      llvm-svn: 39930
      3109001c
    • Chris Lattner's avatar
      Fix a GCC warning: · daaa9f20
      Chris Lattner authored
      SemaExpr.cpp:561: warning: dereferencing type-punned pointer will break strict-aliasing rules
      
      Patch by Benoit Boissinot!
      
      llvm-svn: 39928
      daaa9f20
    • Chris Lattner's avatar
      Implement break and continue. Patch by Anders Carlsson! · e73e4322
      Chris Lattner authored
      llvm-svn: 39927
      e73e4322
    • Chris Lattner's avatar
      avoid requiring people to update from llvm svn. · 7d138433
      Chris Lattner authored
      llvm-svn: 39925
      7d138433
    • Bill Wendling's avatar
      Constify the is*Lvalue() methods. · 457d1343
      Bill Wendling authored
      llvm-svn: 39907
      457d1343
    • Chris Lattner's avatar
      Make octal constant lexing use AdvanceToTokenCharacter to give more · bb1b44f0
      Chris Lattner authored
      accurate diagnostics.  For test/Lexer/comments.c we now emit:
      
      int x = 000000080;  /* expected-error {{invalid digit}} */
                     ^
      constants.c:7:4: error: invalid digit '8' in octal constant
      00080;             /* expected-error {{invalid digit}} */
         ^
      
      
      The last line is due to an escaped newline.  The full line looks like:
      
      int y = 0000\
      00080;             /* expected-error {{invalid digit}} */
      
      
      Previously, we emitted:
      constants.c:4:9: error: invalid digit '8' in octal constant
      int x = 000000080;  /* expected-error {{invalid digit}} */
              ^
      constants.c:6:9: error: invalid digit '8' in octal constant
      int y = 0000\
              ^
      
      which isn't too bad, but the new way is better for the user,
      regardless of whether there is an escaped newline or not.
      
      All the other lexer-related diagnostics should switch over 
      to using AdvanceToTokenCharacter where appropriate.  Help
      wanted :).
      
      This implements test/Lexer/constants.c.
      
      llvm-svn: 39906
      bb1b44f0
    • Chris Lattner's avatar
      Add a new Preprocessor::AdvanceToTokenCharacter method which, given a sloc · 8a7003cd
      Chris Lattner authored
      specifying the start of a token and a logical (phase 3) character number,
      returns a sloc representing the input character corresponding to it.
      
      llvm-svn: 39905
      8a7003cd
    • Chris Lattner's avatar
      add better comments. · eb5b20ae
      Chris Lattner authored
      llvm-svn: 39904
      eb5b20ae
    • Chris Lattner's avatar
      factor a common predicate into a static method. · b0f5d559
      Chris Lattner authored
      llvm-svn: 39903
      b0f5d559
    • Chris Lattner's avatar
      Add a hack (mirroring llvm-gcc) to pointer difference · 651f0e9c
      Chris Lattner authored
      codegen to compile:
      
      int test(int *A, int *B) {
        return A-B;
      }
      
      into:
      
      _test:
              movl 4(%esp), %eax
              subl 8(%esp), %eax
              sarl $2, %eax
              ret
      
      instead of:
      
      _test:
              movl 4(%esp), %eax
              subl 8(%esp), %eax
              movl %eax, %ecx
              sarl $31, %ecx
              shrl $30, %ecx
              addl %ecx, %eax
              sarl $2, %eax
              ret
      
      llvm-svn: 39902
      651f0e9c
Loading