Skip to content
  1. Feb 19, 2009
    • Daniel Dunbar's avatar
      Emission of global variable initialializer was broken in rare · b2f4cdb2
      Daniel Dunbar authored
      situation where a tentative decl was emitted *after* the actual
      initialization. This occurs in some rare situations with static decls.
       - PR3613.
      
       - I'm not particularly happy with this fix, but I don't see a simpler
         or more elegant solution yet.
      
      llvm-svn: 65018
      b2f4cdb2
  2. Feb 17, 2009
    • Daniel Dunbar's avatar
      Eek! getDeclAlign sometimes returned alignment in bits. · 43a5d9e4
      Daniel Dunbar authored
       - Renamed to getDeclAlignInBytes since most other query functions
         work in bits.
      
       - Fun to track down as isIntegerConstantExpr was getting it right,
         but Evaluate() was getting it wrong. Maybe we should assert they
         compute the same thing when they succeed?
      
      llvm-svn: 64828
      43a5d9e4
    • Daniel Dunbar's avatar
      Change EmitConstantExpr to allow failure. · 38ad1e61
      Daniel Dunbar authored
      IRgen no longer relies on isConstantInitializer, instead we just try
      to emit the constant. If that fails then in C we emit an error
      unsupported (this occurs when Sema accepted something that it doesn't
      know how to fold, and IRgen doesn't know how to emit) and in C++ we
      emit a guarded initializer.
      
      This ends up handling a few more cases, because IRgen was actually
      able to emit some of the constants Sema accepts but can't Evaluate().
      For example, PR3398.
      
      llvm-svn: 64780
      38ad1e61
  3. Feb 16, 2009
  4. Feb 15, 2009
  5. Feb 14, 2009
    • Daniel Dunbar's avatar
      x86_64 ABI: Pass simple types directly when possible. This is · 019ef0bb
      Daniel Dunbar authored
      important for both keeping the generated LLVM simple and for ensuring
      that integer types are passed/promoted correctly.
      
      llvm-svn: 64529
      019ef0bb
    • Chris Lattner's avatar
      fix rdar://6586493, a bug in codegen of the GNU · cd7bc144
      Chris Lattner authored
      missing-?:-true-value extension.
      
      llvm-svn: 64505
      cd7bc144
    • Douglas Gregor's avatar
      Implicitly declare certain C library functions (malloc, strcpy, memmove, · b9063fc1
      Douglas Gregor authored
      etc.) when we perform name lookup on them. This ensures that we
      produce the correct signature for these functions, which has two
      practical impacts:
      
        1) When we're supporting the "implicit function declaration" feature
        of C99, these functions will be implicitly declared with the right
        signature rather than as a function returning "int" with no
        prototype. See PR3541 for the reason why this is important (hint:
        GCC always predeclares these functions).
       
        2) If users attempt to redeclare one of these library functions with
        an incompatible signature, we produce a hard error.
      
      This patch does a little bit of work to give reasonable error
      messages. For example, when we hit case #1 we complain that we're
      implicitly declaring this function with a specific signature, and then
      we give a note that asks the user to include the appropriate header
      (e.g., "please include <stdlib.h> or explicitly declare 'malloc'"). In
      case #2, we show the type of the implicit builtin that was incorrectly
      declared, so the user can see the problem. We could do better here:
      for example, when displaying this latter error message we say
      something like:
      
        'strcpy' was implicitly declared here with type 'char *(char *, char
        const *)'
      
      but we should really print out a fake code line showing the
      declaration, like this:
      
        'strcpy' was implicitly declared here as:
      
          char *strcpy(char *, char const *)
      
      This would also be good for printing built-in candidates with C++
      operator overloading.
      
      The set of C library functions supported by this patch includes all
      functions from the C99 specification's <stdlib.h> and <string.h> that
      (a) are predefined by GCC and (b) have signatures that could cause
      codegen issues if they are treated as functions with no prototype
      returning and int. Future work could extend this set of functions to
      other C library functions that we know about.
      
      llvm-svn: 64504
      b9063fc1
  6. Feb 13, 2009
  7. Feb 12, 2009
  8. Feb 11, 2009
  9. Feb 10, 2009
  10. Feb 09, 2009
  11. Feb 06, 2009
  12. Feb 05, 2009
  13. Feb 04, 2009
  14. Feb 03, 2009
  15. Jan 30, 2009
  16. Jan 29, 2009
    • Douglas Gregor's avatar
      Introduce a new expression node, ImplicitValueInitExpr, that · 0202cb40
      Douglas Gregor authored
      represents an implicit value-initialization of a subobject of a
      particular type. This replaces the (ab)use of CXXZeroValueInitExpr
      within initializer lists for the "holes" that occur due to the use of
      C99 designated initializers.
      
      The new test case is currently XFAIL'd, because CodeGen's
      ConstExprEmitter (in lib/CodeGen/CGExprConstant.cpp) needs to be
      taught to value-initialize when it sees ImplicitValueInitExprs.
      
      llvm-svn: 63317
      0202cb40
    • Daniel Dunbar's avatar
      Evaluate ==,!= for complex types. · 74f2425b
      Daniel Dunbar authored
      llvm-svn: 63280
      74f2425b
  17. Jan 28, 2009
  18. Jan 27, 2009
Loading