Go to file
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
clang [coroutines] Add codegen for await and yield expressions 2017-03-26 02:18:05 +00:00
clang-tools-extra [clangd] Add support for vscode extension configuration 2017-03-24 09:29:00 +00:00
compiler-rt Fix sanitizer tests with LLVM_TOOL_LLD_BUILD=OFF. 2017-03-25 00:42:25 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc math: Implement sinh function 2017-02-25 02:46:53 +00:00
libcxx [libc++] Fix some comment typos 2017-03-25 03:42:20 +00:00
libcxxabi Fully Reformat fallback_malloc.cpp 2017-03-04 03:23:15 +00:00
libunwind DarwinParser: include limits 2017-03-14 15:17:55 +00:00
lld Remove unused parameter. 2017-03-26 02:28:09 +00:00
lldb PluginUnwindAssemblyX86: add missing linkage to MCDisasm 2017-03-25 18:51:37 +00:00
llgo [llgo] Remove support for LLVM attributes 2016-12-06 19:22:04 +00:00
llvm [IR] Make SwitchInst::CaseIt almost a normal iterator. 2017-03-26 02:49:23 +00:00
openmp GOMP compatibility: add missing OpenMP4.0 task deps handling code 2017-03-23 15:03:17 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly [ScopInfo] Introduce ScopStmt::contains(BB*). NFC. 2017-03-23 16:12:21 +00:00