- Mar 07, 2014
-
-
Jordan Rose authored
Previously, the assertions in PointerIntPair would try to calculate the value (1 << NumLowBitsAvailable); the inferred type here is 'int', so if there were more than 31 bits available we'd get a shift overflow. Also, add a rudimentary unit test file for PointerIntPair. llvm-svn: 203273
-
Benjamin Kramer authored
No functionality change. llvm-svn: 203242
-
- Mar 06, 2014
-
-
Saleem Abdulrasool authored
This is a preliminary setup change to support a renaming of Windows target triples. Split the object file format information out of the environment into a separate entity. Unfortunately, file format was previously treated as an environment with an unknown OS. This is most obvious in the ARM subtarget where the handling for macho on an arbitrary platform switches to AAPCS rather than APCS (as per Apple's needs). llvm-svn: 203160
-
- Mar 05, 2014
-
-
Ahmed Charles authored
This will make the transition to unique_ptr easier by allowing more incremental changes. llvm-svn: 202949
-
- Mar 04, 2014
-
-
Yaron Keren authored
llvm-svn: 202806
-
- Mar 02, 2014
-
-
Benjamin Kramer authored
The interaction between defaulted operators and move elision isn't totally obvious, add a unit test so it doesn't break unintentionally. llvm-svn: 202662
-
Benjamin Kramer authored
Remove the old functions. llvm-svn: 202636
-
Chandler Carruth authored
directly, and remove the macro. llvm-svn: 202612
-
Chandler Carruth authored
std::unique_ptr<T>. Patch by Ahmed Charles! llvm-svn: 202609
-
Chandler Carruth authored
it interoperate (minimally) with std::unique_ptr<T>. This is part of my plan to migrate LLVM to use std::unique_ptr with a minimal impact on out-of-tree code. Patch by Ahmed Charles with some minor cleanups (and bool casts) by me. llvm-svn: 202608
-
- Mar 01, 2014
-
-
Chandler Carruth authored
llvm-svn: 202583
-
- Feb 26, 2014
-
-
Duncan P. N. Exon Smith authored
Prevent a crash in the SmallDenseMap copy constructor whenever the other map is not in small mode. <rdar://problem/14292693> llvm-svn: 202206
-
- Feb 13, 2014
-
-
Reid Kleckner authored
In theory, Clang should figure out how to parse this correctly without typename, but since this is the last TU that Clang falls back on in the self-host, I'm going to compromise and check for __clang__. And now Clang can self-host on -win32 without fallback! The 'check' and 'check-clang' targets both pass. llvm-svn: 201358
-
- Feb 05, 2014
-
-
Nick Kledzik authored
Now to copy a string into a BumpPtrAllocator and get a StringRef to the copy: StringRef myCopy = myStr.copy(myAllocator); llvm-svn: 200885
-
- Jan 31, 2014
-
-
Duncan P. N. Exon Smith authored
llvm-svn: 200579
-
- Jan 27, 2014
-
-
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
-
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
-
- Jan 19, 2014
-
-
Michael Gottesman authored
[APInt] Fix nearestLogBase2 to return correct answers for very large APInt and APInt with a bitwidth of 1. I also improved the comments, added some more tests, etc. llvm-svn: 199610
-
Michael Gottesman authored
This was due to arithmetic overflow in the getNumBits() computation. Now we cast BitWidth to a uint64_t so that does not occur during the computation. After the computation is complete, the uint64_t is truncated when the function returns. I know that this is not something that is likely to happen, but it *IS* a valid input and we should not blow up. llvm-svn: 199609
-
- Jan 07, 2014
-
-
Chandler Carruth authored
subsequent changes are easier to review. About to fix some layering issues, and wanted to separate out the necessary churn. Also comment and sink the include of "Windows.h" in three .inc files to match the usage in Memory.inc. llvm-svn: 198685
-
- Jan 03, 2014
-
-
David Blaikie authored
llvm-svn: 198379
-
David Blaikie authored
This functionality was enabled by r198374. Here's a test to ensure it works and we don't regress it. Based on a patch by Maciej Piechotka. llvm-svn: 198377
-
David Blaikie authored
It was never specialized so let's just remove that unused configurability and always do the default. llvm-svn: 198374
-
- Dec 19, 2013
-
-
Anna Zaks authored
llvm-svn: 197647
-
- Dec 13, 2013
-
-
Michael Gottesman authored
Remove APInt::extractBit since it is already implemented via operator[]. Change tests for extractBit to test operator[]. llvm-svn: 197277
-
Michael Gottesman authored
llvm-svn: 197272
-
Michael Gottesman authored
llvm-svn: 197271
-
- Dec 10, 2013
-
-
Tim Northover authored
Defaulting to iOS 3.0 when LLVM has to guess the version is no longer a useful option and can give surprising results (like tail calls being disabled). 5.0 seems like a reasonable compromise as a platform that's still interesting to some people. rdar://problem/15567348 llvm-svn: 196912
-
- Nov 20, 2013
-
-
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
-
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
-
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
-