Skip to content
  1. Apr 13, 2009
  2. Apr 08, 2009
  3. Apr 07, 2009
  4. Feb 16, 2009
    • Daniel Dunbar's avatar
      Support IRgen of sqrt -> llvm.sqrt, pow -> llvm.pow. · 8eb018ab
      Daniel Dunbar authored
       - Define pow[lf]?, sqrt[lf]? as builtins.
      
       - Add -fmath-errno option which binds to LangOptions.MathErrno
      
       - Add new builtin flag Builtin::Context::isConstWithoutErrno for
         functions which can be marked as const if errno isn't respected for
         math functions. Sema automatically marks these functions as const
         when they are defined, if MathErrno=0.
      
       - IRgen uses const attribute on sqrt and pow library functions to
         decide if it can use the llvm intrinsic.
      
      llvm-svn: 64689
      8eb018ab
    • Daniel Dunbar's avatar
      Fix IRgen of __builtin_memset. · e28b3598
      Daniel Dunbar authored
       - Fix test case to not only have negative tests.
      
      llvm-svn: 64674
      e28b3598
  5. Feb 14, 2009
    • 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 11, 2009
  7. Feb 05, 2009
  8. Feb 04, 2009
  9. Jan 25, 2009
    • Eli Friedman's avatar
      Make the constant folder aware of · c69d454d
      Eli Friedman authored
      __builtin___CFStringMakeConstantString.  (We get into trouble in 
      GenerateStaticBlockVarDecl if the constant folder isn't accurate.)
      
      llvm-svn: 62949
      c69d454d
  10. Jan 20, 2009
  11. Jan 18, 2009
  12. Dec 22, 2008
  13. Dec 01, 2008
  14. Nov 16, 2008
  15. Nov 04, 2008
  16. Oct 29, 2008
    • Eli Friedman's avatar
      Fix for PR2966: va_start/va_end use the *address* of the · 5adca5f0
      Eli Friedman authored
      va_list, not the value.  Patch fixes an assert on 
      x86-64 and a wrong-code bug on x86.  I'm not completely sure, 
      but I think it's a regression from r58306.
      
      Does anyone run regression tests regularly on x86-64? The crash should 
      have been picked up there.
      
      llvm-svn: 58366
      5adca5f0
  17. Oct 15, 2008
  18. Oct 10, 2008
  19. Oct 06, 2008
  20. Sep 30, 2008
  21. Sep 03, 2008
  22. Aug 30, 2008
  23. Aug 16, 2008
  24. Aug 11, 2008
    • Daniel Dunbar's avatar
      More #include cleaning · 56fdb6ae
      Daniel Dunbar authored
       - Kill unnecessary #includes in .cpp files. This is an automatic
         sweep so some things removed are actually used, but happen to be
         included by a previous header. I tried to get rid of the obvious
         examples and this was the easiest way to trim the #includes in one
         fell swoop.
       - We now return to regularly scheduled development.
      
      llvm-svn: 54632
      56fdb6ae
    • Daniel Dunbar's avatar
      More #include cleaning · 6e8aa537
      Daniel Dunbar authored
       - Drop {Decl.h,DeclObjC.h,IdentifierTable.h} from Expr.h
       - Moved Sema::getCurMethodDecl() out of line (dependent on
         ObjCMethodDecl via dyn_cast).
      
      llvm-svn: 54629
      6e8aa537
  25. Jul 31, 2008
  26. Jul 25, 2008
  27. Jul 23, 2008
  28. Jul 22, 2008
  29. Jul 21, 2008
Loading