summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/Inputs
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2017-03-31 15:36:21 +0000
committerAlex Lorenz <arphaman@gmail.com>2017-03-31 15:36:21 +0000
commit7d7e1e0218a06bcb2568e19bc53589c670dc3018 (patch)
treefcd2fc850b4a9c59d791a239eb14e3842c7cbf2e /clang/test/Modules/Inputs
parent5808011bd9f9b61b93cfe82953e5a03852a86aae (diff)
downloadbcm5719-llvm-7d7e1e0218a06bcb2568e19bc53589c670dc3018.tar.gz
bcm5719-llvm-7d7e1e0218a06bcb2568e19bc53589c670dc3018.zip
[Modules][PCH] Serialize #pragma pack
This patch serializes the state of #pragma pack. It preserves the state of the pragma from a PCH/from modules in a file that uses that PCH/those modules. rdar://21359084 Differential Revision: https://reviews.llvm.org/D31241 llvm-svn: 299226
Diffstat (limited to 'clang/test/Modules/Inputs')
-rw-r--r--clang/test/Modules/Inputs/module.map16
-rw-r--r--clang/test/Modules/Inputs/pragma_pack_push.h6
-rw-r--r--clang/test/Modules/Inputs/pragma_pack_reset_push.h4
-rw-r--r--clang/test/Modules/Inputs/pragma_pack_set.h3
4 files changed, 29 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/module.map b/clang/test/Modules/Inputs/module.map
index 2beb942861a..dcb60bea851 100644
--- a/clang/test/Modules/Inputs/module.map
+++ b/clang/test/Modules/Inputs/module.map
@@ -265,6 +265,22 @@ module diag_pragma {
header "diag_pragma.h"
}
+module pragma_pack_set {
+ header "pragma_pack_set.h"
+}
+
+module pragma_pack_push {
+ header "pragma_pack_push.h"
+}
+
+module pragma_pack_empty {
+ header "empty.h"
+}
+
+module pragma_pack_reset_push {
+ header "pragma_pack_reset_push.h"
+}
+
module dummy {
header "dummy.h"
}
diff --git a/clang/test/Modules/Inputs/pragma_pack_push.h b/clang/test/Modules/Inputs/pragma_pack_push.h
new file mode 100644
index 00000000000..4fc66e51cf8
--- /dev/null
+++ b/clang/test/Modules/Inputs/pragma_pack_push.h
@@ -0,0 +1,6 @@
+
+#pragma pack (push, 4)
+#pragma pack (push, 2)
+#pragma pack (push, 1)
+#pragma pack (pop)
+
diff --git a/clang/test/Modules/Inputs/pragma_pack_reset_push.h b/clang/test/Modules/Inputs/pragma_pack_reset_push.h
new file mode 100644
index 00000000000..18f50a00952
--- /dev/null
+++ b/clang/test/Modules/Inputs/pragma_pack_reset_push.h
@@ -0,0 +1,4 @@
+
+#pragma pack ()
+#pragma pack (push, 4)
+
diff --git a/clang/test/Modules/Inputs/pragma_pack_set.h b/clang/test/Modules/Inputs/pragma_pack_set.h
new file mode 100644
index 00000000000..b123c116ea1
--- /dev/null
+++ b/clang/test/Modules/Inputs/pragma_pack_set.h
@@ -0,0 +1,3 @@
+
+#pragma pack (1)
+
OpenPOWER on IntegriCloud