- Nov 20, 2013
-
-
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
-
- Nov 19, 2013
-
-
Juergen Ributzka authored
This patch places class definitions in implementation files into anonymous namespaces to prevent weak vtables. This eliminates the need of providing an out-of-line definition to pin the vtable explicitly to the file. llvm-svn: 195092
-
Juergen Ributzka authored
This patch removes most of the trivial cases of weak vtables by pinning them to a single object file. The memory leaks in this version have been fixed. Thanks Alexey for pointing them out. Differential Revision: http://llvm-reviews.chandlerc.com/D2068 Reviewed by Andy llvm-svn: 195064
-
- Nov 18, 2013
-
-
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
-
- Nov 15, 2013
-
-
Juergen Ributzka authored
This patch removes most of the trivial cases of weak vtables by pinning them to a single object file. Differential Revision: http://llvm-reviews.chandlerc.com/D2068 Reviewed by Andy llvm-svn: 194865
-
- Nov 13, 2013
-
-
Chandler Carruth authored
This bug only bit the C++98 build bots because all of the actual uses really do move. ;] But not *quite* ready to do the whole C++11 switch yet, so clean it up. Also add a unit test that catches this immediately. llvm-svn: 194548
-
- Nov 09, 2013
-
-
Chandler Carruth authored
a derived type and this makes it *much* easier to write this code. llvm-svn: 194321
-
Chandler Carruth authored
llvm-svn: 194320
-
Chandler Carruth authored
r-value references. I still want to test that when we have them, llvm_move is actually a move. Have I mentioned that I really want to move to C++11? ;] llvm-svn: 194318
-
Chandler Carruth authored
Clang managed to never instantiate the copy constructor. Added tests to ensure this path is tested. We could still use tests for the polymorphic nature. Those coming up next. llvm-svn: 194317
-
Chandler Carruth authored
to fix C++98 builds. llvm-svn: 194316
-
Chandler Carruth authored
unique ownership smart pointer which is *deep* copyable by assuming it can call a T::clone() method to allocate a copy of the owned data. This is mostly useful with containers or other collections of uniquely owned data in C++98 where they *might* copy. With C++11 we can likely remove this in favor of move-only types and containers wrapped around those types. llvm-svn: 194315
-
- Oct 30, 2013
-
-
Rui Ueyama authored
startswith_lower is ocassionally useful and I think worth adding. endwith_lower is added for completeness. Differential Revision: http://llvm-reviews.chandlerc.com/D2041 llvm-svn: 193706
-
- Oct 28, 2013
-
-
Rui Ueyama authored
llvm-svn: 193550
-
- Sep 03, 2013
-
-
Joerg Sonnenberger authored
separator between each two elements. llvm-svn: 189846
-
- Aug 30, 2013
-
-
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
-
- Aug 28, 2013
-
-
Ted Kremenek authored
This is breaking numerous Clang tests on the buildbot. llvm-svn: 189447
-
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
-
- Aug 21, 2013
-
-
David Blaikie authored
llvm-svn: 188933
-
- Jul 27, 2013
-
-
Michael Gottesman authored
IEEE-754R 1.4 Exclusions states that IEEE-754R does not specify the interpretation of the sign of NaNs. In order to remove an irrelevant variable that most floating point implementations do not use, standardize add, sub, mul, div, mod so that operating anything with NaN always yields a positive NaN. In a later commit I am going to update the APIs for creating NaNs so that one can not even create a negative NaN. llvm-svn: 187314
-
Rafael Espindola authored
This reverts commit r187248. It broke many bots. llvm-svn: 187254
-
- Jul 26, 2013
-
-
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
-
- Jul 18, 2013
-
-
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
-
- Jul 11, 2013
-
-
Benjamin Kramer authored
llvm-svn: 186123
-
- Jul 02, 2013
-
-
Michael Gottesman authored
rdar://14323230 llvm-svn: 185397
-
- Jun 27, 2013
-
-
Michael Gottesman authored
[APFloat] Added unittest for APFloat.divide that checks special cases, result categories, and result statuses. llvm-svn: 185050
-
Michael Gottesman authored
llvm-svn: 185045
-
Michael Gottesman authored
[APFloat] Added unittest for APFloat.multiply that checks special cases, result categories, and result status. llvm-svn: 185044
-
Michael Gottesman authored
[APFloat] Added unittest for APFloat.subtract that checks special cases, result categories, and result status. llvm-svn: 185043
-
- Jun 26, 2013
-
-
Michael Gottesman authored
llvm-svn: 184974
-
- Jun 24, 2013
-
-
Michael Gottesman authored
llvm-svn: 184715
-
Michael Gottesman authored
[APFloat] Added a large unittest for APFloat.add that checks that special values are computed correctly. llvm-svn: 184714
-
- Jun 20, 2013
-
-
Michael Gottesman authored
The old isNormal is already functionally replaced by the method isFiniteNonZero in r184350 and all references to said method were replaced in LLVM/clang in r184356/134366. llvm-svn: 184449
-
Michael Gottesman authored
llvm-svn: 184447
-
- Jun 19, 2013
-
-
Michael Gottesman authored
I forgot to to do this in r184356. The only references were in APFloatTest.cpp. llvm-svn: 184366
-
Michael Gottesman authored
This is the first patch in a series of patches to rename isNormal => isFiniteNonZero and isIEEENormal => isNormal. In order to prevent careless errors on my part the overall plan is: 1. Add the isFiniteNonZero predicate with tests. I can do this in a method independent of isNormal. (This step is this patch). 2. Convert all references to isNormal with isFiniteNonZero. My plan is to comment out isNormal locally and continually convert isNormal references => isFiniteNonZero until llvm/clang compiles. 3. Remove old isNormal and rename isIEEENormal to isNormal. 4. Look through all of said references from patch 2 and see if we can simplify them by using the new isNormal. llvm-svn: 184350
-
- Jun 07, 2013
-
-
Benjamin Kramer authored
llvm-svn: 183525
-
Benjamin Kramer authored
llvm-svn: 183521
-
- Jun 04, 2013
-
-
Michael Gottesman authored
Specifically the following work was done: 1. If the operation was not implemented, I implemented it. 2. If the operation was already implemented, I just moved its location in the APFloat header into the IEEE-754R 5.7.2 section. If the name was incorrect, I put in a comment giving the true IEEE-754R name. Also unittests have been added for all of the functions which did not already have a unittest. llvm-svn: 183179
-
- Jun 02, 2013
-
-
Benjamin Kramer authored
llvm-svn: 183081
-