Skip to content
  1. Mar 08, 2012
    • Stepan Dyatkovskiy's avatar
      Taken into account Duncan's comments for r149481 dated by 2nd Feb 2012: · 85fcc2da
      Stepan Dyatkovskiy authored
      http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120130/136146.html
      
      Implemented CaseIterator and it solves almost all described issues: we don't need to mix operand/case/successor indexing anymore. Base iterator class is implemented as a template since it may be initialized either from "const SwitchInst*" or from "SwitchInst*".
      
      ConstCaseIt is just a read-only iterator.
      CaseIt is read-write iterator; it allows to change case successor and case value.
      
      Usage of iterator allows totally remove resolveXXXX methods. All indexing convertions done automatically inside the iterator's getters.
      
      Main way of iterator usage looks like this:
      SwitchInst *SI = ... // intialize it somehow
      
      for (SwitchInst::CaseIt i = SI->caseBegin(), e = SI->caseEnd(); i != e; ++i) {
        BasicBlock *BB = i.getCaseSuccessor();
        ConstantInt *V = i.getCaseValue();
        // Do something.
      }
      
      If you want to convert case number to TerminatorInst successor index, just use getSuccessorIndex iterator's method.
      If you want initialize iterator from TerminatorInst successor index, use CaseIt::fromSuccessorIndex(...) method.
      
      There are also related changes in llvm-clients: klee and clang.
      
      llvm-svn: 152298
      85fcc2da
  2. Mar 07, 2012
    • Richard Smith's avatar
      AST representation for user-defined literals, plus just enough of semantic · c67fdd4e
      Richard Smith authored
      analysis to make the AST representation testable. They are represented by a
      new UserDefinedLiteral AST node, which is a sugared CallExpr. All semantic
      properties, including full CodeGen support, are achieved for free by this
      representation.
      
      UserDefinedLiterals can never be dependent, so no custom instantiation
      behavior is required. They are mangled as if they were direct calls to the
      underlying literal operator. This matches g++'s apparent behavior (but not its
      actual mangling, which is broken for literal-operator-ids).
      
      User-defined *string* literals are now fully-operational, but the semantic
      analysis is quite hacky and needs more work. No other forms of user-defined
      literal are created yet, but the AST support for them is present.
      
      This patch committed after midnight because we had already hit the quota for
      new kinds of literal yesterday.
      
      llvm-svn: 152211
      c67fdd4e
    • Richard Smith's avatar
      Don't even try to directly emit the value of a DeclRefExpr if that declaration · 8c029611
      Richard Smith authored
      is not usable in a constant expression. ~2.5% speedup on 403.gcc / combine.c.
      
      llvm-svn: 152193
      8c029611
  3. Mar 06, 2012
    • Ted Kremenek's avatar
      Add clang support for new Objective-C literal syntax for NSDictionary, NSArray, · e65b086e
      Ted Kremenek authored
      NSNumber, and boolean literals.  This includes both Sema and Codegen support.
      Included is also support for new Objective-C container subscripting.
      
      My apologies for the large patch.  It was very difficult to break apart.
      The patch introduces changes to the driver as well to cause clang to link
      in additional runtime support when needed to support the new language features.
      
      Docs are forthcoming to document the implementation and behavior of these features.
      
      llvm-svn: 152137
      e65b086e
  4. Mar 05, 2012
    • Rafael Espindola's avatar
      Fix a small difference in sema and codegen views of what needs to be output. · 189fa748
      Rafael Espindola authored
      In the included testcase, soma thinks that we already have a definition after we
      see the out of line decl. Codegen puts it in a deferred list, to be output if
      a use is seen. This would break when we saw an explicit template instantiation
      definition, since codegen would not be notified.
      
      This patch adds a method to the consumer interface so that soma can notify
      codegen that this decl is now required.
      
      llvm-svn: 152024
      189fa748
  5. Mar 04, 2012
  6. Mar 03, 2012
  7. Mar 02, 2012
  8. Mar 01, 2012
  9. Feb 29, 2012
  10. Feb 28, 2012
  11. Feb 27, 2012
  12. Feb 26, 2012
    • Richard Smith's avatar
      Ensure that we delete destructors in the right cases. Specifically: · 921bd20d
      Richard Smith authored
       - variant members with nontrivial destructors make the containing class's
         destructor deleted
       - check for a virtual destructor after checking for overridden methods in the
         base class(es)
       - check for an inaccessible operator delete for a class with a virtual
         destructor.
      
      Do not try to call an anonymous union field's destructor from the destructor of
      the containing class.
      
      llvm-svn: 151483
      921bd20d
  13. Feb 25, 2012
  14. Feb 24, 2012
  15. Feb 23, 2012
Loading