1. Aug 28, 2007
  2. Aug 27, 2007
    • Duncan Sands's avatar
      There is an impedance matching problem between LLVM and · ef5a6542
      Duncan Sands authored
      gcc exception handling: if an exception unwinds through
      an invoke, then execution must branch to the invoke's
      unwind target.  We previously tried to enforce this by
      appending a cleanup action to every selector, however
      this does not always work correctly due to an optimization
      in the C++ unwinding runtime: if only cleanups would be
      run while unwinding an exception, then the program just
      terminates without actually executing the cleanups, as
      invoke semantics would require.  I was hoping this
      wouldn't be a problem, but in fact it turns out to be the
      cause of all the remaining failures in the LLVM testsuite
      (these also fail with -enable-correct-eh-support, so turning
      on -enable-eh didn't make things worse!).  Instead we need
      to append a full-blown catch-all to the end of each
      selector.  The correct way of doing this depends on the
      personality function, i.e. it is language dependent, so
      can only be done by gcc.  Thus this patch which generalizes
      the eh.selector intrinsic so that it can handle all possible
      kinds of action table entries (before it didn't accomodate
      cleanups): now 0 indicates a cleanup, and filters have to be
      specified using the number of type infos plus one rather than
      the number of type infos.  Related gcc patches will cause
      Ada to pass a cleanup (0) to force the selector to always
      fire, while C++ will use a C++ catch-all (null).
      
      llvm-svn: 41484
      ef5a6542
    • Steve Naroff's avatar
      Replaced ASTContext::maxFloatingType() with ASTContext::compareFloatingType(). · 7af82d46
      Steve Naroff authored
      Changed Sema::UsualArithmeticConversions to use the new API.
      
      This fixes the following case...
      
      _Complex double X;
      double y;
      
      void foo() {
        X = X + y;
      }
      
      [dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang complex.c -parse-ast-dump
      Read top-level variable decl: 'X'
      Read top-level variable decl: 'y'
      
      void foo()
      (CompoundStmt 0x2605cc0
        (BinaryOperator 0x2605ca0 '_Complex double' '='
          (DeclRefExpr 0x2605c10 '_Complex double' Decl='X' 0x2605ab0)
          (BinaryOperator 0x2605c80 '_Complex double' '+'
            (DeclRefExpr 0x2605c30 '_Complex double' Decl='X' 0x2605ab0)
            (ImplicitCastExpr 0x2605c70 '_Complex double'
              (DeclRefExpr 0x2605c50 'double' Decl='y' 0x2605ae0)))))
      
      llvm-svn: 41483
      7af82d46
    • Dan Gohman's avatar
      Add explicit keywords and remove spurious trailing semicolons. · 032d8982
      Dan Gohman authored
      llvm-svn: 41482
      032d8982