Commit Graph

8 Commits

Author SHA1 Message Date
Dmitri Hrybenko
37a4335b88 Replace swift::Range with llvm::iterator_range
Due to inreased use of llvm::make_range in LLVM headers and ADL for
types defined in the swift namespace, some of the LLVM headers started
to trigger ambiguity errors between llvm::make_range and
swift::make_range.

Swift SVN r29700
2015-06-25 22:01:39 +00:00
Michael Gottesman
aaab6d4668 When emitting sorted SIL, emit BBs in RPOT order.
This makes it easier to diff and read SIL output. Since it is behind the -emit-sorted-sil
flag, there is no effect on normal compilation.

Swift SVN r26101
2015-03-13 15:56:26 +00:00
Dmitri Hrybenko
fbfed25468 Qualify call to make_range to avoid ambiguity between {swift,llvm}::make_range
Swift SVN r16204
2014-04-11 09:06:54 +00:00
John McCall
d715c2c7de Provide a simple IntRange class as well as an 'indices'
function for getting the indices of a vector or array.

Swift SVN r10049
2013-11-08 20:51:05 +00:00
Joe Groff
c0a44f71c9 IRGen: Reify SpecializeInst thunks.
Teach IRGen how to emit thunks for SpecializeInsts that aren't immediately called and actually get used as values. This allows generic function instance to get passed around as values (again), and is a step along the way to making closures in generic contexts work (so we can specialize the local function, then partially apply its specialized context).

This doesn't work yet if we specialize to local archetypes--SIL needs to learn that we need a [thick]-typed thunk for local archetype specializations, in order to pack the metadata and wtables for the local type variables.

Swift SVN r5083
2013-05-07 23:39:06 +00:00
Joe Groff
bfd2f85b5c Parse 'fallthrough' statements.
Create a new FallthroughStmt, which transfers control from a 'case' or 'default' block to the next 'case' or 'default' block within a switch. Implement parsing and sema for FallthroughStmt, which syntactically consists of a single 'fallthrough' keyword. Sema verifies that 'fallthrough' actually appears inside a switch statement and that there is a following case or default block to pass control to.

SILGen/IRGen support forthcoming.

Swift SVN r4653
2013-04-10 17:30:42 +00:00
Joe Groff
b105e02534 IRGen: Lower SIL bb arguments to LLVM phi nodes.
Swift SVN r4493
2013-03-27 17:07:17 +00:00
John McCall
2bf56a3a2e Add a Range type which just bundles two iterators together and
lets you iterate that.

Swift SVN r4463
2013-03-21 05:29:16 +00:00