llvm-project/llvm/lib
Chandler Carruth 0d256c0f5d [IR] Make SwitchInst::CaseIt almost a normal iterator.
This moves it to the iterator facade utilities giving it full random
access semantics, etc. It can also now be used with standard algorithms
like std::all_of and std::any_of and range adaptors like llvm::reverse.

Also make the semantics of iterating match what every other iterator
uses and forbid decrementing past the begin iterator. This was used as
a hacky way to work around iterator invalidation. However, every
instance trying to do this failed to actually avoid touching invalid
iterators despite the clear documentation that the removed and all
subsequent iterators become invalid including the end iterator. So I've
added a return of the next iterator to removeCase and rewritten the
loops that were doing this to correctly follow the iterator pattern of
either incremneting or removing and assigning fresh values to the
iterator and the end.

In one case we were trying to go backwards to make this cleaner but it
doesn't actually work. I've made that code match the code we use
everywhere else to remove cases as we iterate. This changes the order of
cases in one test output and I moved that test to CHECK-DAG so it
wouldn't care -- the order isn't semantically meaningful anyways.

llvm-svn: 298791
2017-03-26 02:49:23 +00:00
..
Analysis Revert r298711 "[InstCombine] Provide a way to calculate KnownZero/One for Add/Sub in SimplifyDemandedUseBits without recursing into ComputeKnownBits" 2017-03-24 22:12:10 +00:00
AsmParser Rename AttributeSet to AttributeList 2017-03-21 16:57:19 +00:00
Bitcode [ThinLTO] Add support for emitting minimized bitcode for thin link 2017-03-23 19:47:39 +00:00
CodeGen [x86] use PMOVMSK to replace memcmp libcalls for 16-byte equality 2017-03-25 16:05:33 +00:00
DebugInfo [PDB] Split item and type records when merging type streams 2017-03-24 17:26:38 +00:00
Demangle Add support for demangling C++11 thread_local variables. 2017-01-31 15:56:36 +00:00
ExecutionEngine Rename AttributeSet to AttributeList 2017-03-21 16:57:19 +00:00
Fuzzer [libFuzzer] Fix test on Windows. 2017-03-25 01:19:45 +00:00
IR [IR] Make SwitchInst::CaseIt almost a normal iterator. 2017-03-26 02:49:23 +00:00
IRReader Timer: Track name and description. 2016-11-18 19:43:18 +00:00
LTO IPO: Const correctness for summaries passed into passes. 2017-03-22 18:22:59 +00:00
LibDriver LibDriver: Allow resource files to be archive members. 2016-12-15 19:37:46 +00:00
LineEditor
Linker [Linker] Provide callback for internalization 2017-03-13 18:08:11 +00:00
MC [WebAssembly] Fix import type to be signed LEBs 2017-03-23 15:46:47 +00:00
Object [ThinLTO] Add support for emitting minimized bitcode for thin link 2017-03-23 19:47:39 +00:00
ObjectYAML [ObjectYAML] Fix issue with DWARF2 AddrSize 8 2017-03-07 21:34:35 +00:00
Option Cleanup dump() functions. 2017-01-28 02:02:38 +00:00
Passes Add call branch annotation for ICP promoted direct call in SamplePGO mode. 2017-02-23 22:15:18 +00:00
ProfileData SamplePGO ThinLTO ICP fix for local functions. 2017-03-14 17:33:01 +00:00
Support Make home_directory look in the password database in addition to $HOME. 2017-03-22 15:24:59 +00:00
TableGen Use print() instead of dump() in code 2017-01-28 02:47:46 +00:00
Target [X86] Pull out repeated ScalarValueSizeInBits code. NFCI. 2017-03-25 21:22:12 +00:00
Transforms [IR] Make SwitchInst::CaseIt almost a normal iterator. 2017-03-26 02:49:23 +00:00
XRay [XRAY] [x86_64] Adding a Flight Data filetype reader to the llvm-xray Trace implementation. 2017-02-17 01:47:16 +00:00
CMakeLists.txt [XRay] Define the library for XRay trace logs 2017-01-11 06:39:09 +00:00
LLVMBuild.txt Add an c++ itanium demangler to llvm. 2016-09-06 19:16:48 +00:00