Commit Graph

24 Commits

Author SHA1 Message Date
Ben Barham
ef8825bfe6 Migrate llvm::Optional to std::optional
LLVM has removed llvm::Optional, move over to std::optional. Also
clang-format to fix up all the renamed #includes.
2024-02-21 11:20:06 -08:00
Min-Yih Hsu
b363bbdd78 [IRGen][Patch 2/2] Add IRGen support for SIL DIExpression
This patch is primarily doing two things:
 - Teach IRGen for some of the instructions to generate debug info based
   on SILDebugVariable rather than AST node, which is not always
   available when reading from SIL.
 - Generate corresponding `llvm.dbg.*` intrinsics and `!DIExpression`
   from the newly added SIL DIExpression.
2021-07-21 09:26:51 -07:00
Erik Eckstein
90501578b0 IRGen: fix statically initialized globals which contain an empty type.
This caused a compiler assert or a miscompile

rdar://problem/34123143
2017-08-29 09:53:18 -07:00
John McCall
4e48bc0ff7 Cache type-metadata layouts instead of using scanners everywhere. NFC.
Also counts as incremental work towards metadata resilience.
2017-08-03 04:13:53 -04:00
Joe Groff
aaddafa55b IRGen: Support for generic key path patterns. 2017-04-17 17:50:57 -07:00
Joe Groff
f929c29bdf IRGen: Lower keypath instructions to patterns for the runtime to instantiate. 2017-04-04 11:31:15 -07:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
Huon Wilson
25b41906a2 [IRGen] Handle padding in global structs.
Previously there was a mismatch between SIL's concept of a
struct (padding is implicit) and LLVM's (padding is explicit) in IRGen's
constant evaluator. The explicit padding fields need to be given a value
in the IR.

This patch also moves the (currently small) list of constant evaluation
functions into their own file.

Fixes SR-716.
2016-09-29 05:21:49 -07:00
John McCall
f33c84fb3d RemoteAST: implement getOffsetOfMember for structs and classes. 2016-04-28 16:29:20 -07:00
practicalswift
50baf2e53b Use consistent formatting in top of file headers. 2016-01-04 02:17:48 +01:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
John McCall
93d7bc4f0d Remove unnecessary Expr uses from IR-gen.
Swift SVN r12428
2014-01-16 22:32:35 +00:00
John McCall
93dfaa6bf4 Make everything getting a TypeInfo declare whether it's
working with a SIL-lowered or SIL-unlowered type.

Swift SVN r10067
2013-11-09 01:41:16 +00:00
Joe Groff
6d8942f436 IRGen: Put struct field offsets into struct metadata.
When we have fixed offsets available for fields, emit them into the metadata or metadata pattern. If we don't, emit zero and leave it for the pattern fill function to resolve at runtime.

Swift SVN r9114
2013-10-09 23:49:01 +00:00
Doug Gregor
786f9d299b Fold GenericMemberRefExpr into MemberRefExpr.
MemberRefExpr now uses ConcreteDeclRef to refer to its member, which
includes the substitutions and obviates the need for
GenericMemberRefExpr.


Swift SVN r7842
2013-09-03 15:49:19 +00:00
John McCall
2ffcef1670 Make a couple minor interfaces traffic in Address instead
of OwnedAddress.

Swift SVN r7349
2013-08-20 00:55:04 +00:00
Joe Groff
409655e037 SIL: Split tuple/struct field accessor insns.
Split ExtractInst and ElementAddrInst into separate Tuple and Struct versions, and have the Struct versions reference struct member VarDecls directly instead of integer indices.

Swift SVN r5215
2013-05-17 23:34:11 +00:00
Joe Groff
b439e49625 IRGen: Use SILTypes in field projection functions.
Swift SVN r5154
2013-05-10 23:17:08 +00:00
Chris Lattner
47e508c24d remove LValue, PathComponent, and LValue.h as a whole.
Swift SVN r4792
2013-04-18 04:50:03 +00:00
Joe Groff
b3ae290685 IRGen: Codegen SIL 'extract' from rvalue struct.
Swift SVN r4481
2013-03-25 16:08:08 +00:00
Joe Groff
7e57041393 IRGen: SIL struct manipulation.
Implement ElementRefInst so that struct accessors work. Also extend SILConstant lowering to support constant_refs to constructors, destructors, and property accessors so that constructor and property accessor references work. (Constructors don't yet get visited by IRGenSIL, though.)

Swift SVN r3776
2013-01-16 19:04:08 +00:00
John McCall
17027b8d8e Basic support for members of generic types.
Swift SVN r2619
2012-08-13 09:03:40 +00:00
Eli Friedman
120f6deb6b Add GenStruct.h, which I meant to commit with r1806.
Swift SVN r1815
2012-05-11 21:45:22 +00:00