hanchenye-llvm-project/llvm/unittests/Support
Hans Wennborg 44e2746418 BumpPtrAllocator: do the size check without moving any pointers
Instead of aligning and moving the CurPtr forward, and then comparing
with End, simply calculate how much space is needed, and compare that
to how much is available.

Hopefully this avoids any doubts about comparing addresses possibly
derived from past the end of the slab array, overflowing, etc.

Also add a test where aligning CurPtr would move it past End.

llvm-svn: 217330
2014-09-07 04:24:31 +00:00
..
AlignOfTest.cpp
AllocatorTest.cpp BumpPtrAllocator: do the size check without moving any pointers 2014-09-07 04:24:31 +00:00
ArrayRecyclerTest.cpp
BlockFrequencyTest.cpp Support: More BlockFrequencyTest => BranchProbabilityTest 2014-04-29 16:44:59 +00:00
BranchProbabilityTest.cpp SupportTest: Fix test names harder 2014-04-29 17:07:45 +00:00
CMakeLists.txt Decouple llvm::SpecialCaseList text representation and its LLVM IR semantics. 2014-07-09 19:40:08 +00:00
Casting.cpp [C++11] Use 'nullptr'. 2014-06-08 22:29:17 +00:00
CommandLineTest.cpp Fix PR17239 by changing the semantics of the RemainingArgsClass Option kind 2014-08-22 19:29:17 +00:00
CompressionTest.cpp Simplify compression API by compressing into a SmallVector rather than a MemoryBuffer 2014-04-05 21:53:04 +00:00
ConvertUTFTest.cpp Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or just letting them be implicitly created. 2014-08-27 05:25:25 +00:00
DataExtractorTest.cpp [C++11] Use 'nullptr'. 2014-06-08 22:29:17 +00:00
EndianTest.cpp
ErrorOrTest.cpp Ensure ErrorOr cannot implicitly invoke explicit ctors of the underlying type. 2014-09-03 17:31:25 +00:00
FileOutputBufferTest.cpp Remove the last uses of 'using std::error_code' 2014-06-13 03:20:08 +00:00
IteratorTest.cpp [ADT] Generalize pointee_iterator to smart pointers by using decltype. 2014-04-24 21:10:35 +00:00
LEB128Test.cpp [Support] Fix the overflow bug in ULEB128 decoding. 2014-08-22 16:29:45 +00:00
LineIteratorTest.cpp Convert a few more cases of direct intialization of unique_ptrs from MemoryBuffer::getMemBuffer to move initialization now that it returns by unique_ptr instead of raw pointer. 2014-08-27 20:14:18 +00:00
LockFileManagerTest.cpp Asserting that the call to chdir succeeds in this test. Fixes some -Wunused-result warnings. 2014-08-13 11:17:41 +00:00
MD5Test.cpp Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or just letting them be implicitly created. 2014-08-27 05:25:25 +00:00
Makefile Update incorrect file headers. 2013-08-01 18:42:28 +00:00
ManagedStatic.cpp Re-apply r211287: Remove support for LLVM runtime multi-threading. 2014-06-27 15:13:01 +00:00
MathExtrasTest.cpp [Support] Remove Count{Leading,Trailing}Zeros_{32,64}. 2013-05-24 22:58:37 +00:00
MemoryBufferTest.cpp Update the MemoryBuffer API to use ErrorOr. 2014-07-06 17:43:13 +00:00
MemoryTest.cpp Remove the last uses of 'using std::error_code' 2014-06-13 03:20:08 +00:00
Path.cpp Fix Path unittests on Windows after raw_fd_ostream changes 2014-08-26 00:24:23 +00:00
ProcessTest.cpp Cleaning up static initializers in TimeValue. 2014-08-29 01:05:12 +00:00
ProgramTest.cpp Add writeFileWithSystemEncoding to LibLLVMSuppor. 2014-09-03 20:02:00 +00:00
RegexTest.cpp [C++11] Remove uses of LLVM_HAS_RVALUE_REFERENCES from the unittests. 2014-03-01 09:36:06 +00:00
ScaledNumberTest.cpp Remove unused typedef. GCC warns about this. 2014-07-01 15:39:32 +00:00
SourceMgrTest.cpp Return a std::unique_ptr when creating a new MemoryBuffer. 2014-08-27 20:03:13 +00:00
SpecialCaseListTest.cpp unique_ptrify the result of SpecialCaseList::create 2014-09-02 18:13:54 +00:00
StringPool.cpp PR10140 - StringPool's PooledStringPtr has non-const operator== causing bad OR-result. 2014-06-19 00:26:49 +00:00
SwapByteOrderTest.cpp Adding llvm::sys::swapByteOrder() for the common use-case of byte-swapping a value in place 2014-06-14 12:52:55 +00:00
ThreadLocalTest.cpp [C++11] Use 'nullptr'. 2014-06-08 22:29:17 +00:00
TimeValueTest.cpp [C++11] Use 'nullptr'. 2014-06-08 22:29:17 +00:00
UnicodeTest.cpp Move generic isPrint and columnWidth implementations to a separate header/source to allow using both generic and system-dependent versions on win32. 2013-09-04 16:00:12 +00:00
YAMLIOTest.cpp Fix bug 20125 - clang-format segfaults on bad config. 2014-08-08 13:58:00 +00:00
YAMLParserTest.cpp Return a std::unique_ptr when creating a new MemoryBuffer. 2014-08-27 20:03:13 +00:00
formatted_raw_ostream_test.cpp
raw_ostream_test.cpp [C++11] Use 'nullptr'. 2014-06-08 22:29:17 +00:00