Skip to content
  1. Feb 05, 2014
  2. Jan 31, 2014
  3. Jan 27, 2014
    • Alp Toker's avatar
      Roll back the ConstStringRef change for now · 17d4e98e
      Alp Toker authored
      There are a couple of interesting things here that we want to check over
      (particularly the expecting asserts in StringRef) and get right for general use
      in ADT so hold back on this one. For clang we have a workable templated
      solution to use in the meanwhile.
      
      This reverts commit r200187.
      
      llvm-svn: 200194
      17d4e98e
    • Alp Toker's avatar
      StringRef: Extend constexpr capabilities and introduce ConstStringRef · 042f41b0
      Alp Toker authored
      (1) Add llvm_expect(), an asserting macro that can be evaluated as a constexpr
          expression as well as a runtime assert or compiler hint in release builds. This
          technique can be used to construct functions that are both unevaluated and
          compiled depending on usage.
      
      (2) Update StringRef using llvm_expect() to preserve runtime assertions while
          extending the same checks to static asserts in C++11 builds that support the
          feature.
      
      (3) Introduce ConstStringRef, a strong subclass of StringRef that references
          compile-time constant strings. It's convertible to, but not from, ordinary
          StringRef and thus can be used to add compile-time safety to various interfaces
          in LLVM and clang that only accept fixed inputs such as diagnostic format
          strings that tend to get misused.
      
      llvm-svn: 200187
      042f41b0
  4. Jan 19, 2014
  5. Jan 07, 2014
  6. Jan 03, 2014
  7. Dec 19, 2013
  8. Dec 13, 2013
  9. Dec 10, 2013
  10. Nov 20, 2013
    • Chandler Carruth's avatar
      Make the moved-from SmallPtrSet be a valid, empty, small-state object. · c74010df
      Chandler Carruth authored
      Enhance the tests to actually require moves in C++11 mode, in addition
      to testing the moved-from state. Further enhance the tests to cover
      copy-assignment into a moved-from object and moving a large-state
      object. (Note that we can't really test small-state vs. large-state as
      that isn't an observable property of the API really.) This should finish
      addressing review on r195239.
      
      llvm-svn: 195261
      c74010df
    • Chandler Carruth's avatar
      Add a test for assignment operator behavior which was changed in · 6d888bc0
      Chandler Carruth authored
      r195239, as well as a comment about the fact that assigning over
      a moved-from object was in fact tested. Addresses some of the review
      feedback on r195239.
      
      llvm-svn: 195260
      6d888bc0
    • Chandler Carruth's avatar
      Give SmallPtrSet move semantics when we have R-value references. · 55758e96
      Chandler Carruth authored
      Somehow, this ADT got missed which is moderately terrifying considering
      the efficiency of move for it.
      
      The code to implement move semantics for it is pretty horrible
      currently but was written to reasonably closely match the rest of the
      code. Unittests that cover both copying and moving (at a basic level)
      added.
      
      llvm-svn: 195239
      55758e96
  11. Nov 19, 2013
  12. Nov 18, 2013
    • Alexey Samsonov's avatar
      Revert r194865 and r194874. · 49109a27
      Alexey Samsonov authored
      This change is incorrect. If you delete virtual destructor of both a base class
      and a subclass, then the following code:
        Base *foo = new Child();
        delete foo;
      will not cause the destructor for members of Child class. As a result, I observe
      plently of memory leaks. Notable examples I investigated are:
      ObjectBuffer and ObjectBufferStream, AttributeImpl and StringSAttributeImpl.
      
      llvm-svn: 194997
      49109a27
  13. Nov 15, 2013
  14. Nov 13, 2013
  15. Nov 09, 2013
  16. Oct 30, 2013
  17. Oct 28, 2013
  18. Sep 03, 2013
  19. Aug 30, 2013
    • Eli Friedman's avatar
      Change default # of digits for APFloat::toString · e72f1320
      Eli Friedman authored
      This is a re-commit of r189442; I'll follow up with clang changes.
      
      The previous default was almost, but not quite enough digits to
      represent a floating-point value in a manner which preserves the
      representation when it's read back in.  The larger default is much
      less confusing.
      
      I spent some time looking into printing exactly the right number of
      digits if a precision isn't specified, but it's kind of complicated,
      and I'm not really sure I understand what APFloat::toString is supposed
      to output for FormatPrecision != 0 (or maybe the current API specification
      is just silly, not sure which).  I have a WIP patch if anyone is interested.
      
      llvm-svn: 189624
      e72f1320
  20. Aug 28, 2013
    • Ted Kremenek's avatar
      Revert r189442 "Change default # of digits for APFloat::toString" · b33f944f
      Ted Kremenek authored
      This is breaking numerous Clang tests on the buildbot.
      
      llvm-svn: 189447
      b33f944f
    • Eli Friedman's avatar
      Change default # of digits for APFloat::toString · 14cede28
      Eli Friedman authored
      The previous default was almost, but not quite enough digits to
      represent a floating-point value in a manner which preserves the
      representation when it's read back in.  The larger default is much
      less confusing.
      
      I spent some time looking into printing exactly the right number of
      digits if a precision isn't specified, but it's kind of complicated,
      and I'm not really sure I understand what APFloat::toString is supposed
      to output for FormatPrecision != 0 (or maybe the current API specification
      is just silly, not sure which).  I have a WIP patch if anyone is interested.
      
      llvm-svn: 189442
      14cede28
  21. Aug 21, 2013
  22. Jul 27, 2013
  23. Jul 26, 2013
    • Bill Schmidt's avatar
      [PowerPC] Improve consistency in use of __ppc__, __powerpc__, etc. · 419f7c23
      Bill Schmidt authored
      Both GCC and LLVM will implicitly define __ppc__ and __powerpc__ for
      all PowerPC targets, whether 32- or 64-bit.  They will both implicitly
      define __ppc64__ and __powerpc64__ for 64-bit PowerPC targets, and not
      for 32-bit targets.  We cannot be sure that all other possible
      compilers used to compile Clang/LLVM define both __ppc__ and
      __powerpc__, for example, so it is best to check for both when relying
      on either inside the Clang/LLVM code base.
      
      This patch makes sure we always check for both variants.  In addition,
      it fixes one unnecessary check in lib/Target/PowerPC/PPCJITInfo.cpp.
      (At least one of __ppc__ and __powerpc__ should always be defined when
      compiling for a PowerPC target, no matter which compiler is used, so
      testing for them is unnecessary.)
      
      There are some places in the compiler that check for other variants,
      like __POWERPC__ and _POWER, and I have left those in place.  There is
      no need to add them elsewhere.  This seems to be in Apple-specific
      code, and I won't take a chance on breaking it.
      
      There is no intended change in behavior; thus, no test cases are
      added.
      
      llvm-svn: 187248
      419f7c23
  24. Jul 18, 2013
    • Eli Friedman's avatar
      Handle '.' correctly in hex float literal parsing. · d2eb07ac
      Eli Friedman authored
      There were a couple of different loops that were not handling
      '.' correctly in APFloat::convertFromHexadecimalString; these mistakes
      could lead to assertion failures and incorrect rounding for overlong
      hex float literals.
      
      Fixes PR16643.
      
      llvm-svn: 186539
      d2eb07ac
Loading