Skip to content
  1. Feb 20, 2012
    • Douglas Gregor's avatar
      When we resolve the type of an 'auto' variable, clear out the linkage · d5c4844e
      Douglas Gregor authored
      of that variable; it will need to be recomputed with the resolved
      type.
      
      llvm-svn: 150984
      d5c4844e
    • Douglas Gregor's avatar
      Basic support for name mangling of C++11 lambda expressions. Because · 63798544
      Douglas Gregor authored
      name mangling in the Itanium C++ ABI for lambda expressions is so
      dependent on context, we encode the number used to encode each lambda
      as part of the lambda closure type, and maintain this value within
      Sema.
      
      Note that there are a several pieces still missing:
        - We still get the linkage of lambda expressions wrong
        - We aren't properly numbering or mangling lambda expressions that
        occur in default function arguments or in data member initializers.
        - We aren't (de-)serializing the lambda numbering tables
      
      llvm-svn: 150982
      63798544
  2. Feb 17, 2012
    • Douglas Gregor's avatar
      Rework the Sema/AST/IRgen dance for the lambda closure type's · 355efbb2
      Douglas Gregor authored
      conversion to function pointer. Rather than having IRgen synthesize
      the body of this function, we instead introduce a static member
      function "__invoke" with the same signature as the lambda's
      operator() in the AST. Sema then generates a body for the conversion
      to function pointer which simply returns the address of __invoke. This
      approach makes it easier to evaluate a call to the conversion function
      as a constant, makes the linkage of the __invoke function follow the
      normal rules for member functions, and may make life easier down the
      road if we ever want to constexpr'ify some of lambdas.
      
      Note that IR generation is responsible for filling in the body of
      __invoke (Sema just adds a dummy body), because the body can't
      generally be expressed in C++.
      
      Eli, please review!
      
      llvm-svn: 150783
      355efbb2
  3. Feb 14, 2012
Loading