llvm/unittests
Duncan P. N. Exon Smith cb8ffd254b ADT: Fix SmallPtrSet iterators in reverse mode
Fix SmallPtrSet::iterator behaviour and creation ReverseIterate is true.

  - Any function that creates an iterator now uses
    SmallPtrSet::makeIterator, which creates an iterator that
    dereferences to the given pointer.

  - In reverse-iterate mode, initialze iterator::End with "CurArray"
    instead of EndPointer.

  - In reverse-iterate mode, the current node is iterator::Buffer[-1].
    iterator::operator* and SmallPtrSet::makeIterator are the only ones
    that need to know.

  - Fix the assertions for reverse-iterate mode.

This fixes the tests Danny B added in r297182, and adds a couple of
others to confirm that dereferencing does the right thing, regardless of
how the iterator was found, and that iteration works correctly from each
return from find.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297234 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-07 21:56:32 +00:00
..
ADT ADT: Fix SmallPtrSet iterators in reverse mode 2017-03-07 21:56:32 +00:00
Analysis [SCEV] Decrease the recursion threshold for CompareValueComplexity 2017-03-05 23:49:17 +00:00
AsmParser Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
Bitcode Reapply "Make BitCodeAbbrev ownership explicit using shared_ptr rather than IntrusiveRefCntPtr"" 2017-01-04 22:36:33 +00:00
CodeGen Revert r297177: Change LLT constructor string into an LLT-based object ... 2017-03-07 19:21:23 +00:00
DebugInfo [DWARF] NFC. A few bits of minor code cleanup. 2017-03-06 19:25:07 +00:00
ExecutionEngine [Orc][RPC] Accept both const char* and char* arguments for string serialization. 2017-02-24 20:56:43 +00:00
IR [IR] Add range accessors for the indices of a GEP instruction. 2017-02-28 08:04:20 +00:00
LineEditor Remove autoconf support 2016-01-26 21:29:08 +00:00
Linker Implement intrinsic mangling for literal struct types. 2017-02-15 23:16:20 +00:00
MC Fix static initialization order fiasco in MCTests 2016-11-11 22:18:42 +00:00
MI Test if we can use raw strings on all platforms compiling LLVM. 2017-02-23 01:09:01 +00:00
Object Fix unittest for buildbot with mips host (32bit big endian) from r295174 2017-02-15 16:03:22 +00:00
ObjectYAML Move ObjectYAML code to a new library. 2016-03-01 19:15:06 +00:00
Option Option parser: class for consuming a joined arg in addition to all remaining args 2016-04-15 00:23:30 +00:00
ProfileData Fix spelling mistakes in Tools/Tests comments. NFC. 2016-11-20 13:31:13 +00:00
Support [AArch64] Vulcan is now ThunderXT99 2017-03-07 19:42:40 +00:00
Target Remove a FIXME that I forgot about. NFC. 2016-10-13 05:28:55 +00:00
Transforms Move updating functions to MemorySSAUpdater. 2017-02-22 22:19:55 +00:00
XRay [XRay][graph] Disambiguate name of type from member name 2017-02-10 06:59:25 +00:00
CMakeLists.txt [XRay] A graph Class for the llvm-xray graph 2017-02-10 06:36:08 +00:00