Duncan P. N. Exon Smith
03df14c6dd
Modules: Do not serialize #pragma pack state
...
The modules side of r299226, which serializes #pragma pack state,
doesn't work well.
The main purpose was to make -include and -include-pch match semantics
(the PCH side). We also started serializing #pragma pack in PCMs, in
the hopes of making modules and non-modules builds more consistent. But
consider:
$ cat a.h
$ cat b.h
#pragma pack(push, 2)
$ cat module.modulemap
module M {
module a { header "a.h" }
module b { header "b.h" }
}
$ cat t.cpp
#include "a.h"
#pragma pack(show)
As of r299226, the #pragma pack(show) gives "2", even though we've only
included "a.h".
- With -fmodules-local-submodule-visibility, this is clearly wrong. We
should get the default state (8 on x86_64).
- Without -fmodules-local-submodule-visibility, this kind of matches how
other things work (as if include-the-whole-module), but it's still
really terrible, and it doesn't actually make modules and non-modules
builds more consistent.
This commit disables the serialization for modules, essentially a
partial revert of r299226.
Going forward:
1. Having this #pragma pack stuff escape is terrible design (or, more
often, a horrible bug). We should prioritize adding warnings (maybe
-Werror by default?).
2. If we eventually reintroduce this for modules, it should only apply
to -fmodules-local-submodule-visibility, and it should be tracked on
a per-submodule basis.
llvm-svn: 300380
2017-04-15 00:07:57 +00:00
..
2017-04-15 00:07:57 +00:00
2017-01-26 23:07:59 +00:00
2015-11-17 23:32:01 +00:00
2015-11-13 19:08:07 +00:00
2017-01-11 02:14:51 +00:00
2017-04-04 02:50:40 +00:00
2017-04-12 20:58:33 +00:00
2017-04-12 21:09:34 +00:00
2017-02-08 20:51:11 +00:00
2017-04-12 21:14:04 +00:00
2016-10-31 08:21:54 +00:00
2016-10-31 08:21:54 +00:00
2016-12-06 00:40:17 +00:00
2016-12-11 04:27:31 +00:00
2016-12-12 19:28:25 +00:00
2016-12-22 07:06:03 +00:00
2016-12-09 03:11:48 +00:00
2016-12-09 03:11:48 +00:00
2016-12-09 03:11:48 +00:00
2016-12-09 03:11:48 +00:00
2016-12-09 03:11:48 +00:00
2016-12-09 03:11:48 +00:00
2016-12-09 03:11:48 +00:00
2016-05-16 16:46:01 +00:00
2016-10-26 01:08:55 +00:00
2017-03-08 23:00:26 +00:00
2016-12-23 00:23:01 +00:00
2017-04-13 21:37:24 +00:00
2016-05-03 23:06:40 +00:00
2016-05-03 23:06:40 +00:00
2015-10-08 04:24:12 +00:00
2016-05-03 23:06:40 +00:00
2015-11-12 22:19:45 +00:00
2017-03-10 19:34:15 +00:00
2017-03-10 19:34:15 +00:00
2017-01-26 01:01:01 +00:00
2017-03-13 18:45:08 +00:00
2015-12-11 22:05:13 +00:00
2016-02-06 02:06:43 +00:00
2016-07-21 21:07:47 +00:00
2016-10-20 23:11:45 +00:00
2016-10-20 23:11:45 +00:00
2016-06-23 15:07:32 +00:00
2016-04-12 20:20:33 +00:00
2016-08-29 20:46:59 +00:00
2017-04-14 17:37:29 +00:00
2016-09-13 01:13:19 +00:00
2015-11-03 18:33:07 +00:00
2015-10-13 00:39:40 +00:00
2017-03-21 16:43:51 +00:00
2016-05-03 23:06:40 +00:00
2016-09-01 20:15:25 +00:00
2017-03-06 17:47:57 +00:00
2015-12-18 22:19:11 +00:00
2017-01-26 23:07:59 +00:00
2016-04-06 23:28:26 +00:00
2016-02-11 18:54:02 +00:00
2017-04-12 03:58:58 +00:00
2017-01-18 20:34:44 +00:00
2016-02-19 22:25:36 +00:00
2017-01-11 02:14:51 +00:00
2017-01-11 02:14:51 +00:00
2016-03-14 17:52:37 +00:00
2016-10-21 23:27:37 +00:00
2015-11-03 03:13:11 +00:00
2017-02-07 21:54:57 +00:00
2016-08-25 00:34:00 +00:00
2016-10-21 01:41:56 +00:00
2015-11-04 19:26:32 +00:00
2017-04-12 21:46:16 +00:00
2016-09-09 23:48:27 +00:00
2016-04-08 19:57:40 +00:00
2015-11-12 22:19:45 +00:00
2016-09-08 20:34:41 +00:00
2017-01-26 23:07:59 +00:00
2017-01-26 22:39:55 +00:00
2015-11-05 00:54:55 +00:00
2016-10-17 13:00:44 +00:00
2016-10-06 20:30:51 +00:00
2017-03-01 17:55:03 +00:00
2016-10-19 11:19:30 +00:00
2016-04-29 19:04:05 +00:00
2016-02-05 19:03:40 +00:00
2016-01-08 22:36:45 +00:00
2017-03-13 18:45:08 +00:00
2017-03-09 00:58:22 +00:00
2016-10-21 23:35:03 +00:00
2017-03-24 19:32:20 +00:00
2015-11-12 22:19:45 +00:00
2016-10-20 23:11:45 +00:00
2016-10-20 23:11:45 +00:00
2016-08-22 22:30:34 +00:00
2017-03-15 01:38:24 +00:00
2015-10-30 16:30:27 +00:00
2016-03-21 19:06:06 +00:00
2015-11-17 03:02:41 +00:00
2016-08-03 06:10:15 +00:00
2017-02-22 23:18:49 +00:00
2016-09-09 23:48:27 +00:00
2016-09-09 23:48:27 +00:00
2016-09-09 23:48:27 +00:00
2016-10-11 21:18:20 +00:00
2016-10-14 18:55:44 +00:00
2016-10-03 21:26:46 +00:00
2017-04-12 16:40:26 +00:00
2016-07-20 19:10:16 +00:00
2017-03-20 17:58:26 +00:00
2017-02-24 02:49:47 +00:00
2016-03-06 04:20:05 +00:00
2016-05-31 18:19:32 +00:00
2017-01-09 19:20:18 +00:00
2016-03-30 22:22:50 +00:00
2016-03-16 11:17:04 +00:00
2016-04-08 20:53:26 +00:00
2016-03-30 22:18:29 +00:00
2016-01-22 19:03:27 +00:00
2016-03-30 20:16:03 +00:00
2016-04-06 20:58:12 +00:00
2016-04-28 14:13:28 +00:00
2016-04-26 23:40:43 +00:00
2016-07-22 20:49:31 +00:00
2016-05-24 12:10:36 +00:00
2016-05-17 22:44:15 +00:00
2016-06-20 15:10:40 +00:00
2016-07-22 21:08:24 +00:00
2016-08-18 06:15:19 +00:00
2016-10-14 21:41:24 +00:00
2016-10-26 10:24:29 +00:00
2017-01-12 09:16:26 +00:00
2017-04-15 00:07:57 +00:00
2016-08-19 05:25:26 +00:00
2016-04-08 01:23:59 +00:00
2015-11-05 15:24:47 +00:00
2016-10-20 23:11:45 +00:00
2017-03-13 18:45:08 +00:00
2016-12-06 00:14:22 +00:00
2016-08-30 21:25:42 +00:00
2016-01-08 22:36:45 +00:00
2016-10-20 23:11:45 +00:00
2016-09-13 01:20:40 +00:00
2016-11-17 18:41:18 +00:00
2015-11-12 22:19:45 +00:00
2015-11-13 05:14:45 +00:00
2016-07-15 20:53:25 +00:00
2016-04-27 21:57:05 +00:00
2015-10-08 06:31:22 +00:00
2017-03-20 17:58:26 +00:00
2016-01-11 22:41:53 +00:00
2016-01-09 06:58:48 +00:00
2016-10-26 02:31:56 +00:00
2017-01-12 19:15:33 +00:00
2015-11-14 03:26:14 +00:00
2016-05-04 00:53:13 +00:00
2016-10-28 02:37:04 +00:00
2016-07-20 19:10:16 +00:00
2016-05-17 02:15:12 +00:00
2016-01-12 20:34:32 +00:00
2015-11-12 21:55:58 +00:00
2015-10-13 00:23:25 +00:00
2017-03-20 17:58:26 +00:00