Skip to content
  1. Feb 19, 2009
  2. Feb 17, 2009
    • 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 14, 2009
    • Mike Stump's avatar
      Generate the helper function for blocks. Now basic codegen is · 2d5a2878
      Mike Stump authored
      starting to work for blocks.
      
      llvm-svn: 64570
      2d5a2878
    • Douglas Gregor's avatar
      Add hook to add attributes to function declarations that we know · e711f705
      Douglas Gregor authored
      about, whether they are builtins or not. Use this to add the
      appropriate "format" attribute to NSLog, NSLogv, asprintf, and
      vasprintf, and to translate builtin attributes (from Builtins.def)
      into actual attributes on the function declaration.
      
      Use the "printf" format attribute on function declarations to
      determine whether we should do format string checking, rather than
      looking at an ad hoc list of builtins and "known" function names.
      
      Be a bit more careful about when we consider a function a "builtin" in
      C++.
      
      llvm-svn: 64561
      e711f705
  4. Feb 12, 2009
  5. Feb 11, 2009
  6. Feb 01, 2009
  7. Jan 30, 2009
  8. Jan 29, 2009
  9. Jan 28, 2009
    • Daniel Dunbar's avatar
      Implement basic _Complex integer constant folding. · f50e60b2
      Daniel Dunbar authored
       - Merged into single ComplexEvaluator, these share too much logic to
         be worth splitting for float/int (IMHO). Will split on request.
      
      llvm-svn: 63248
      f50e60b2
    • Douglas Gregor's avatar
      Code generation support for C99 designated initializers. · 347f7eab
      Douglas Gregor authored
      The approach I've taken in this patch is relatively straightforward,
      although the code itself is non-trivial. Essentially, as we process
      an initializer list we build up a fully-explicit representation of the
      initializer list, where each of the subobject initializations occurs
      in order. Designators serve to "fill in" subobject initializations in
      a non-linear way. The fully-explicit representation makes initializer
      lists (both with and without designators) easy to grok for codegen and
      later semantic analyses. We keep the syntactic form of the initializer
      list linked into the AST for those clients interested in exactly what
      the user wrote.
      
      Known limitations:
        - Designating a member of a union that isn't the first member may
          result in bogus initialization (we warn about this)
        - GNU array-range designators are not supported (we warn about this)
      
      llvm-svn: 63242
      347f7eab
  10. Jan 25, 2009
  11. Jan 24, 2009
  12. Jan 18, 2009
  13. Jan 17, 2009
  14. Jan 12, 2009
  15. Jan 06, 2009
    • Douglas Gregor's avatar
      Add QualifiedDeclRefExpr, which retains additional source-location · c7acfdfe
      Douglas Gregor authored
      information for declarations that were referenced via a qualified-id,
      e.g., N::C::value. We keep track of the location of the start of the
      nested-name-specifier. Note that the difference between
      QualifiedDeclRefExpr and DeclRefExpr does have an effect on the
      semantics of function calls in two ways:
        1) The use of a qualified-id instead of an unqualified-id suppresses
           argument-dependent lookup
        2) If the name refers to a virtual function, the qualified-id
        version will call the function determined statically while the
        unqualified-id version will call the function determined dynamically
        (by looking up the appropriate function in the vtable).
      
      Neither of these features is implemented yet, but we do print out
      qualified names for QualifiedDeclRefExprs as part of the AST printing.
      
      llvm-svn: 61789
      c7acfdfe
  16. Dec 21, 2008
  17. Dec 12, 2008
  18. Dec 11, 2008
    • Douglas Gregor's avatar
      Unifies the name-lookup mechanisms used in various parts of the AST · 91f84216
      Douglas Gregor authored
      and separates lexical name lookup from qualified name lookup. In
      particular:
        * Make DeclContext the central data structure for storing and
          looking up declarations within existing declarations, e.g., members
          of structs/unions/classes, enumerators in C++0x enums, members of
          C++ namespaces, and (later) members of Objective-C
          interfaces/implementations. DeclContext uses a lazily-constructed
          data structure optimized for fast lookup (array for small contexts,
          hash table for larger contexts). 
      
        * Implement C++ qualified name lookup in terms of lookup into
          DeclContext.
      
        * Implement C++ unqualified name lookup in terms of
          qualified+unqualified name lookup (since unqualified lookup is not
          purely lexical in C++!)
      
        * Limit the use of the chains of declarations stored in
          IdentifierInfo to those names declared lexically.
      
        * Eliminate CXXFieldDecl, collapsing its behavior into
          FieldDecl. (FieldDecl is now a ScopedDecl).
      
        * Make RecordDecl into a DeclContext and eliminates its
          Members/NumMembers fields (since one can just iterate through the
          DeclContext to get the fields).
      
      llvm-svn: 60878
      91f84216
  19. Dec 01, 2008
  20. Nov 25, 2008
  21. Nov 22, 2008
  22. Nov 17, 2008
  23. Nov 16, 2008
  24. Nov 15, 2008
  25. Nov 11, 2008
  26. Oct 27, 2008
  27. Oct 21, 2008
  28. Oct 12, 2008
  29. Oct 06, 2008
Loading