1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/unittests
Michael Kruse 63a060a406 [ADT] Add zip_longest iterators
Like the already existing zip_shortest/zip_first iterators, zip_longest
iterates over multiple iterators at once, but has as many iterations as
the longest sequence.

This means some iterators may reach the end before others do.
zip_longest uses llvm::Optional's None value to mark a
past-the-end value.

zip_longest is not reverse-iteratable because the tuples iterated over
would be different for different length sequences (IMHO for the same
reason neither zip_shortest nor zip_first should be reverse-iteratable;
one can still reverse the ranges individually if that's the expected
behavior).

In contrast to zip_shortest/zip_first, zip_longest tuples contain
rvalues instead of references. This is because llvm::Optional cannot
contain reference types and the value-initialized default does not have
a memory location a reference could point to.

The motivation for these iterators is to use C++ foreach to compare two
lists of ordered attributes in D48100 (SemaOverload.cpp and
ASTReaderDecl.cpp).

Idea by @hfinkel.

Differential Revision: https://reviews.llvm.org/D48348

llvm-svn: 348301
2018-12-04 21:06:16 +00:00
..
ADT [ADT] Add zip_longest iterators 2018-12-04 21:06:16 +00:00
Analysis [ValueTracking] Support funnel shifts in computeKnownBits() 2018-12-02 14:14:11 +00:00
AsmParser
BinaryFormat [BinaryFormat] Add MsgPackTypes 2018-11-15 18:50:01 +00:00
Bitcode Pass a reference to a module to the bitcode writer. 2018-02-14 19:11:32 +00:00
CodeGen [ARM GlobalISel] Support G_CTLZ and G_CTLZ_ZERO_UNDEF 2018-11-26 11:07:02 +00:00
DebugInfo [DebugInfo] Define base function on DWARFDie reverse iterators 2018-10-30 18:25:28 +00:00
Demangle [Demangle] remove itaniumFindTypesInMangledName 2018-11-27 16:11:24 +00:00
ExecutionEngine [Support] Make error banner optional in logAllUnhandledErrors 2018-11-11 01:46:03 +00:00
FuzzMutate [FuzzMutate] Inst deleter doesn't work with PhiNodes 2018-01-25 09:22:18 +00:00
IR [MetadataTest] Fix off-by-one strncpy warning reported by gcc8. (NFC) 2018-11-25 19:38:02 +00:00
LineEditor
Linker Inline a few CMake variables into their only uses. 2018-05-14 19:23:31 +00:00
MC [WebAssembly] Added default stack-only instruction mode for MC. 2018-08-27 15:45:51 +00:00
MI MachineModuleInfo: Store more specific reference to LLVMTargetMachine; NFC 2018-11-05 23:49:13 +00:00
Object Fix unittest for buildbot with mips host (32bit big endian) from r295174 2017-02-15 16:03:22 +00:00
ObjectYAML
Option [opt] Change the parameter of OptTable::PrintHelp from Name to Usage and don't append "[options] <inputs>" 2018-10-10 00:15:31 +00:00
OptRemarks Reland: [OptRemarks] Add library for parsing optimization remarks 2018-10-10 18:43:42 +00:00
Passes [NewPM] teach -passes= to emit meaningful error messages 2018-10-17 10:36:23 +00:00
ProfileData Support for remapping profile data when symbols change, for sample-based 2018-10-10 21:31:01 +00:00
Support [AArch64] Add command-line option for SSBS 2018-12-03 14:00:47 +00:00
Target MachineModuleInfo: Store more specific reference to LLVMTargetMachine; NFC 2018-11-05 23:49:13 +00:00
TextAPI [llvm-tapi] initial commit, supports ELF text stubs 2018-12-03 19:30:52 +00:00
tools [llvm-exegesis][NFC] Some code style cleanup 2018-11-20 14:41:59 +00:00
Transforms [CodeExtractor] Split PHI nodes with incoming values from outlined region (PR39433) 2018-12-03 22:40:21 +00:00
XRay [XRay] Improve FDR trace handling and error messaging 2018-11-09 06:26:48 +00:00
CMakeLists.txt [llvm-tapi] initial commit, supports ELF text stubs 2018-12-03 19:30:52 +00:00
unittest.cfg.in Add support for unittest inputs. 2018-09-05 23:30:17 +00:00