Douglas Gregor
355efbb2e0
Rework the Sema/AST/IRgen dance for the lambda closure type's
...
conversion to function pointer. Rather than having IRgen synthesize
the body of this function, we instead introduce a static member
function "__invoke" with the same signature as the lambda's
operator() in the AST. Sema then generates a body for the conversion
to function pointer which simply returns the address of __invoke. This
approach makes it easier to evaluate a call to the conversion function
as a constant, makes the linkage of the __invoke function follow the
normal rules for member functions, and may make life easier down the
road if we ever want to constexpr'ify some of lambdas.
Note that IR generation is responsible for filling in the body of
__invoke (Sema just adds a dummy body), because the body can't
generally be expressed in C++.
Eli, please review!
llvm-svn: 150783
2012-02-17 03:02:34 +00:00
..
2011-08-20 00:17:18 +00:00
2011-08-20 00:17:18 +00:00
2011-08-20 00:17:18 +00:00
2011-08-20 00:17:18 +00:00
2011-08-20 00:17:18 +00:00
2011-08-20 00:17:18 +00:00
2011-08-20 00:09:39 +00:00
2011-08-20 00:09:39 +00:00
2011-08-20 00:09:39 +00:00
2011-08-20 00:09:39 +00:00
2011-08-20 00:09:39 +00:00
2011-08-20 00:09:39 +00:00
2011-08-20 00:09:39 +00:00
2011-08-20 00:09:39 +00:00
2011-08-19 23:41:35 +00:00
2011-08-19 23:41:35 +00:00
2011-08-19 23:41:35 +00:00
2011-08-19 23:41:35 +00:00
2011-08-19 23:41:35 +00:00
2011-08-19 23:41:35 +00:00
2011-08-19 23:41:35 +00:00
2011-08-19 23:41:35 +00:00
2011-08-19 23:41:35 +00:00
2011-08-19 23:41:35 +00:00
2011-08-19 23:46:18 +00:00
2011-08-19 23:41:35 +00:00
2011-08-19 23:15:04 +00:00
2011-11-08 19:55:32 +00:00
2011-08-19 23:08:33 +00:00
2011-08-19 23:08:33 +00:00
2011-08-19 23:08:33 +00:00
2011-08-19 23:08:33 +00:00
2011-08-19 23:08:33 +00:00
2011-08-19 23:08:33 +00:00
2011-08-19 23:08:33 +00:00
2011-08-19 23:08:33 +00:00
2011-08-19 23:08:33 +00:00
2011-08-19 23:08:33 +00:00
2011-08-19 23:08:33 +00:00
2011-08-19 22:25:02 +00:00
2011-08-19 22:16:30 +00:00
2011-08-19 22:16:28 +00:00
2011-08-19 23:17:46 +00:00
2011-08-19 22:16:21 +00:00
2011-08-15 22:48:14 +00:00
2011-08-19 21:51:07 +00:00
2011-08-19 21:51:01 +00:00
2011-08-19 21:51:03 +00:00
2011-08-19 21:50:59 +00:00
2011-08-19 21:24:41 +00:00
2011-08-19 21:24:39 +00:00
2011-08-19 21:24:37 +00:00
2011-08-16 21:41:54 +00:00
2011-08-16 21:41:52 +00:00
2011-08-16 21:41:50 +00:00
2011-08-16 21:41:48 +00:00
2011-08-16 21:41:46 +00:00
2011-08-16 21:41:44 +00:00
2011-08-16 21:41:41 +00:00
2011-12-20 04:00:21 +00:00
2012-02-06 08:31:19 +00:00
2011-07-26 23:18:30 +00:00
2011-02-28 00:40:07 +00:00
2011-08-10 15:22:55 +00:00
2012-01-20 22:01:23 +00:00
2011-01-28 23:42:29 +00:00
2011-01-21 01:04:41 +00:00
2011-02-02 23:12:46 +00:00
2011-09-19 18:05:26 +00:00
2011-02-15 18:54:46 +00:00
2012-01-31 23:52:58 +00:00
2011-10-13 22:29:44 +00:00
2011-10-13 22:29:44 +00:00
2010-12-21 02:36:58 +00:00
2010-11-02 02:33:08 +00:00
2011-10-28 01:04:34 +00:00
2011-11-28 16:30:08 +00:00
2011-06-13 22:51:21 +00:00
2010-12-07 15:23:23 +00:00
2011-06-13 22:51:21 +00:00
2012-01-14 04:30:29 +00:00
2011-09-06 21:41:04 +00:00
2012-01-25 23:20:27 +00:00
2011-06-03 22:24:54 +00:00
2011-10-13 22:29:44 +00:00
2011-10-07 02:39:22 +00:00
2011-11-23 02:12:00 +00:00
2011-08-26 07:31:35 +00:00
2012-01-25 05:04:17 +00:00
2011-11-17 22:56:20 +00:00
2012-02-17 00:44:16 +00:00
2012-01-12 06:08:57 +00:00
2011-02-19 21:54:50 +00:00
2011-10-13 22:29:44 +00:00
2011-10-10 22:41:00 +00:00
2011-10-13 22:29:44 +00:00
2011-01-18 05:36:08 +00:00
2011-10-13 22:29:44 +00:00
2011-10-13 22:29:44 +00:00
2011-10-13 22:29:44 +00:00
2011-11-02 23:04:16 +00:00
2011-10-13 22:29:44 +00:00
2011-10-13 22:29:44 +00:00
2011-10-13 22:29:44 +00:00
2011-08-09 00:26:11 +00:00
2011-07-09 17:41:47 +00:00
2011-06-13 22:51:21 +00:00
2011-01-25 19:10:24 +00:00
2011-07-09 17:41:47 +00:00
2011-10-13 22:29:44 +00:00
2011-10-13 22:29:44 +00:00
2011-11-27 16:50:07 +00:00
2011-10-13 22:29:44 +00:00
2012-01-20 22:01:23 +00:00
2010-11-13 21:53:34 +00:00
2012-02-09 07:26:21 +00:00
2011-11-09 12:43:30 +00:00
2012-02-03 23:58:39 +00:00
2012-01-20 22:10:18 +00:00
2010-10-01 23:32:17 +00:00
2011-10-13 22:29:44 +00:00
2012-02-16 22:54:45 +00:00
2011-10-21 23:30:10 +00:00
2012-02-03 23:58:39 +00:00
2011-01-06 22:30:05 +00:00
2012-02-13 14:56:11 +00:00
2012-02-16 22:45:48 +00:00
2011-11-05 05:41:57 +00:00
2012-02-03 23:58:39 +00:00
2011-11-05 05:41:57 +00:00
2011-11-05 05:41:57 +00:00
2011-05-02 04:49:53 +00:00
2012-02-03 23:58:39 +00:00
2011-11-04 20:05:58 +00:00
2011-10-28 21:12:13 +00:00
2012-02-13 15:04:15 +00:00
2011-04-04 23:18:38 +00:00
2011-04-06 00:01:52 +00:00
2011-09-10 00:44:49 +00:00
2011-09-01 21:49:51 +00:00
2011-06-03 22:24:54 +00:00
2011-01-25 19:10:24 +00:00
2011-01-25 19:10:24 +00:00
2011-06-14 21:20:53 +00:00
2011-06-03 22:24:54 +00:00
2011-06-13 22:51:21 +00:00
2011-01-27 09:37:56 +00:00
2011-09-21 08:36:56 +00:00
2011-10-13 22:29:44 +00:00
2010-12-01 04:43:34 +00:00
2011-04-17 21:49:47 +00:00
2011-09-19 20:31:14 +00:00
2011-01-29 05:04:11 +00:00
2011-04-10 18:20:53 +00:00
2011-10-13 22:29:44 +00:00
2011-09-19 20:31:14 +00:00
2011-10-13 22:29:44 +00:00
2011-06-13 22:51:21 +00:00
2010-12-29 23:02:58 +00:00
2012-01-13 03:58:31 +00:00
2011-02-28 00:40:07 +00:00
2012-02-16 22:45:48 +00:00
2011-04-12 01:46:54 +00:00
2011-12-13 05:09:22 +00:00
2012-01-31 23:43:25 +00:00
2011-10-13 22:29:44 +00:00
2011-10-14 23:32:50 +00:00
2011-10-14 23:32:50 +00:00
2011-02-09 02:03:05 +00:00
2011-10-13 22:29:44 +00:00
2011-07-09 17:41:47 +00:00
2011-05-13 01:05:07 +00:00
2011-11-10 10:43:54 +00:00
2011-06-17 00:18:42 +00:00
2011-07-22 06:27:26 +00:00
2010-12-15 04:00:32 +00:00
2011-12-13 00:32:15 +00:00
2011-05-16 23:49:20 +00:00
2011-06-10 21:53:06 +00:00
2011-02-19 02:53:41 +00:00
2012-02-17 03:02:34 +00:00
2011-08-16 21:41:40 +00:00
2012-01-18 23:55:52 +00:00
2010-10-18 21:28:44 +00:00
2011-12-03 18:24:43 +00:00
2012-02-03 17:16:23 +00:00
2012-02-06 02:54:51 +00:00
2010-10-18 21:28:44 +00:00
2010-10-18 21:28:44 +00:00
2011-12-01 09:55:00 +00:00
2010-11-16 00:32:31 +00:00
2011-10-13 22:29:44 +00:00
2011-09-26 01:56:36 +00:00
2012-01-06 05:06:35 +00:00
2011-10-13 22:29:44 +00:00
2011-02-01 08:30:38 +00:00
2011-10-13 22:29:44 +00:00
2012-01-30 18:36:31 +00:00
2011-08-16 21:41:38 +00:00
2012-02-15 01:22:51 +00:00
2011-01-25 19:10:24 +00:00
2011-10-13 22:29:44 +00:00
2011-06-15 18:37:44 +00:00
2011-10-13 22:29:44 +00:00
2010-10-22 21:05:15 +00:00
2011-01-25 19:10:24 +00:00
2011-07-13 06:10:41 +00:00
2012-02-16 22:45:48 +00:00
2011-07-06 15:46:09 +00:00
2011-02-16 23:59:08 +00:00
2011-11-11 23:36:04 +00:00
2011-10-13 22:29:44 +00:00
2012-02-03 19:31:51 +00:00
2011-09-19 20:31:14 +00:00
2011-12-07 01:30:11 +00:00
2011-02-03 06:36:50 +00:00
2012-01-14 04:30:29 +00:00
2012-02-14 21:14:13 +00:00
2012-01-26 02:02:57 +00:00
2011-10-13 22:29:44 +00:00
2011-02-28 00:40:07 +00:00
2011-12-12 23:13:20 +00:00
2011-04-17 21:56:13 +00:00
2012-02-01 23:24:59 +00:00
2011-01-10 22:34:03 +00:00
2011-10-13 22:29:44 +00:00
2011-08-14 04:50:34 +00:00
2011-11-16 02:19:03 +00:00
2011-11-27 18:35:39 +00:00
2011-10-13 22:29:44 +00:00
2011-01-11 23:55:05 +00:00
2011-01-29 22:10:32 +00:00
2011-01-29 22:39:23 +00:00
2011-10-13 22:29:44 +00:00
2011-10-13 22:29:44 +00:00
2011-08-30 01:42:09 +00:00
2011-05-16 04:08:36 +00:00
2011-04-12 01:46:54 +00:00
2011-10-13 22:29:44 +00:00
2012-02-16 20:41:22 +00:00
2011-05-31 05:41:42 +00:00
2011-07-09 17:41:47 +00:00
2011-09-13 22:21:56 +00:00
2011-06-14 21:20:53 +00:00
2012-01-16 18:22:26 +00:00
2012-01-17 23:55:19 +00:00
2012-01-16 18:07:45 +00:00
2011-07-10 06:03:22 +00:00
2010-11-02 21:05:53 +00:00
2011-04-12 01:46:54 +00:00
2011-08-18 09:09:59 +00:00
2011-01-25 19:10:24 +00:00
2011-11-27 22:09:28 +00:00
2011-09-19 20:31:14 +00:00
2011-04-27 04:37:08 +00:00
2011-02-28 00:40:07 +00:00
2011-10-15 02:10:40 +00:00
2011-08-16 21:41:26 +00:00
2011-02-06 20:09:44 +00:00
2012-01-29 01:20:30 +00:00
2011-02-28 00:40:07 +00:00
2011-12-27 12:18:28 +00:00
2011-12-27 12:18:28 +00:00
2011-11-01 02:23:42 +00:00
2011-10-13 22:29:44 +00:00
2011-04-12 00:42:48 +00:00
2011-12-30 21:15:51 +00:00
2011-10-13 22:29:44 +00:00
2011-05-21 19:26:31 +00:00
2011-08-27 01:09:30 +00:00
2011-10-13 22:29:44 +00:00
2011-07-09 18:33:01 +00:00
2011-01-25 19:10:24 +00:00
2011-01-11 23:55:05 +00:00
2011-01-24 00:46:19 +00:00
2011-01-14 22:19:38 +00:00
2011-06-14 21:20:53 +00:00
2011-07-09 17:41:47 +00:00
2011-01-25 19:10:24 +00:00
2011-07-09 17:41:47 +00:00
2011-12-24 21:56:24 +00:00
2011-06-14 21:20:53 +00:00
2011-02-01 05:45:26 +00:00
2011-12-27 21:15:28 +00:00
2012-01-14 00:30:36 +00:00
2011-12-20 02:08:33 +00:00
2011-08-12 23:33:52 +00:00
2010-12-05 02:00:02 +00:00
2011-02-06 20:16:20 +00:00
2011-05-02 04:50:00 +00:00
2011-01-24 00:46:19 +00:00
2011-09-26 01:57:00 +00:00
2011-04-10 18:00:32 +00:00
2011-04-15 05:22:18 +00:00
2011-07-09 17:41:47 +00:00
2011-01-24 00:46:19 +00:00
2010-09-23 09:40:20 +00:00
2011-10-21 22:27:12 +00:00
2011-08-19 20:43:24 +00:00
2011-11-18 01:25:50 +00:00
2011-07-13 21:58:55 +00:00
2011-08-16 21:41:31 +00:00