summaryrefslogtreecommitdiff
path: root/test/Modules/Inputs/lsv-debuginfo
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-01-19 10:04:05 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-01-19 10:04:05 +0000
commit676fbe8105eeb6ff4bb2ed261cb212fcfdbe7b63 (patch)
tree02a1ac369cb734d0abfa5000dd86e5b7797e6a74 /test/Modules/Inputs/lsv-debuginfo
parentc7e70c433efc6953dc3888b9fbf9f3512d7da2b0 (diff)
Notes
Diffstat (limited to 'test/Modules/Inputs/lsv-debuginfo')
-rw-r--r--test/Modules/Inputs/lsv-debuginfo/A/ADT.h45
-rw-r--r--test/Modules/Inputs/lsv-debuginfo/B/B.h14
-rw-r--r--test/Modules/Inputs/lsv-debuginfo/C/C.h13
-rw-r--r--test/Modules/Inputs/lsv-debuginfo/module.modulemap9
4 files changed, 81 insertions, 0 deletions
diff --git a/test/Modules/Inputs/lsv-debuginfo/A/ADT.h b/test/Modules/Inputs/lsv-debuginfo/A/ADT.h
new file mode 100644
index 000000000000..f48d4f7820a8
--- /dev/null
+++ b/test/Modules/Inputs/lsv-debuginfo/A/ADT.h
@@ -0,0 +1,45 @@
+#ifndef ADT
+#define ADT
+
+#ifdef WITH_NAMESPACE
+namespace llvm {
+#endif
+template <unsigned Alignment, unsigned Size>
+struct AlignedCharArray {
+ alignas(Alignment) char buffer[Size];
+};
+
+template <typename T1>
+class AlignerImpl {
+ T1 t1;
+};
+
+template <typename T1>
+union SizerImpl {
+ char arr1[sizeof(T1)];
+};
+
+template <typename T1>
+struct AlignedCharArrayUnion
+ : AlignedCharArray<alignof(AlignerImpl<T1>), sizeof(SizerImpl<T1>)> {};
+
+template <typename T, unsigned N>
+struct SmallVectorStorage {
+ AlignedCharArrayUnion<T> InlineElts[N];
+};
+template <typename T, unsigned N>
+class SmallVector : SmallVectorStorage<T, N> {};
+
+template <typename T>
+struct OptionalStorage {
+ AlignedCharArrayUnion<T> storage;
+};
+template <typename T>
+class Optional {
+ OptionalStorage<T> Storage;
+};
+
+#ifdef WITH_NAMESPACE
+} // namespace llvm
+#endif
+#endif
diff --git a/test/Modules/Inputs/lsv-debuginfo/B/B.h b/test/Modules/Inputs/lsv-debuginfo/B/B.h
new file mode 100644
index 000000000000..c00bc3cddbf5
--- /dev/null
+++ b/test/Modules/Inputs/lsv-debuginfo/B/B.h
@@ -0,0 +1,14 @@
+#ifndef B_H
+#define B_H
+#include <A/ADT.h>
+#include <C/C.h>
+
+namespace llvm {
+struct S {
+ unsigned a, b, c, d;
+};
+class C {
+ Optional<S> S;
+};
+}
+#endif
diff --git a/test/Modules/Inputs/lsv-debuginfo/C/C.h b/test/Modules/Inputs/lsv-debuginfo/C/C.h
new file mode 100644
index 000000000000..52c6e4dbac94
--- /dev/null
+++ b/test/Modules/Inputs/lsv-debuginfo/C/C.h
@@ -0,0 +1,13 @@
+#ifndef C_H
+#define C_H
+#include <A/ADT.h>
+
+namespace llvm {
+class D {
+ struct Q {
+ unsigned a, b, c, d;
+ };
+ SmallVector<Q, 4> q;
+};
+} // namespace llvm
+#endif
diff --git a/test/Modules/Inputs/lsv-debuginfo/module.modulemap b/test/Modules/Inputs/lsv-debuginfo/module.modulemap
new file mode 100644
index 000000000000..5bb044908dc7
--- /dev/null
+++ b/test/Modules/Inputs/lsv-debuginfo/module.modulemap
@@ -0,0 +1,9 @@
+module A {
+ umbrella "A" module * { export * }
+}
+module B {
+ umbrella "B" module * { export * }
+}
+module C {
+ umbrella "C" module * { export * }
+}