llvm-project/llvm/lib
Pete Cooper f3159f3c12 Reapply "Add reverse(ContainerTy) range adapter."
This reverts commit r243567, which ultimately reapplies r243563.

The fix here was to use std::enable_if for overload resolution.  Thanks to David
Blaikie for lots of help on this, and for the extra tests!

Original commit message follows:

For cases where we needed a foreach loop in reverse over a container,
we had to do something like

 for (const GlobalValue *GV : make_range(TypeInfos.rbegin(),
                                         TypeInfos.rend())) {

This provides a convenience method which shortens this to

 for (const GlobalValue *GV : reverse(TypeInfos)) {

There are 2 versions of this, with a preference to the rbegin() version.

The first uses rbegin() and rend() to construct an iterator_range.

The second constructs an iterator_range from the begin() and end() methods
wrapped in std::reverse_iterator's.

Reviewed by David Blaikie.

llvm-svn: 243581
2015-07-29 22:19:09 +00:00
..
Analysis Rename hasCompatibleFunctionAttributes->areInlineCompatible based 2015-07-29 22:09:48 +00:00
AsmParser [opaque pointers] Avoid the use of pointee types when parsing inline asm in IR 2015-07-27 23:32:19 +00:00
Bitcode Reserve some constant values for the Swift calling convention. 2015-07-28 04:05:45 +00:00
CodeGen Reapply "Add reverse(ContainerTy) range adapter." 2015-07-29 22:19:09 +00:00
DebugInfo [RuntimeDyld] Make LoadedObjectInfo::getLoadedSectionAddress take a SectionRef 2015-07-28 17:52:11 +00:00
ExecutionEngine [RuntimeDyld] Make LoadedObjectInfo::getLoadedSectionAddress take a SectionRef 2015-07-28 17:52:11 +00:00
Fuzzer [libFuzzer] ensure that the dfsan tracing hooks actually run (using -verbosity=3 in tests) 2015-07-28 01:25:00 +00:00
IR [opaque pointers] Remove use of PointerType::getElementType in favor of GEPOperator::getSourceElementType 2015-07-29 20:26:23 +00:00
IRReader Return a unique_ptr from getLazyBitcodeModule and parseBitcodeFile. NFC. 2015-06-16 22:27:55 +00:00
LTO Remove access to the DataLayout in the TargetMachine 2015-07-24 16:04:22 +00:00
LibDriver Add support for producing thin archives in llvm-lib. 2015-07-17 16:01:11 +00:00
LineEditor Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
Linker Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MC [llvm-mc] Add --no-warn flag with -W alias to disable outputting warnings while assembling. 2015-07-27 22:39:14 +00:00
Object Summary: 2015-07-28 16:18:17 +00:00
Option Add an ArgList::AddAllArgs that accepts a vector of OptSpecifier. 2015-07-29 17:34:41 +00:00
Passes [PM] Fixup for r231556 where I missed a dependency on intrinsics 2015-03-07 09:08:20 +00:00
ProfileData Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
Support - Added support for parsing HWDiv features using Target Parser. 2015-07-27 22:26:59 +00:00
TableGen [TableGen] Emit the correct error message. 2015-07-27 17:22:19 +00:00
Target Rename hasCompatibleFunctionAttributes->areInlineCompatible based 2015-07-29 22:09:48 +00:00
Transforms [ASan] Disable dynamic alloca and UAR detection in presence of returns_twice calls. 2015-07-29 19:36:08 +00:00
CMakeLists.txt LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00
LLVMBuild.txt Wrap some long lines in LLVMBuild files. NFC 2015-06-12 18:44:57 +00:00
Makefile LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00