summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/symbols
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2020-08-03 14:33:06 +0000
committerpatrick <patrick@openbsd.org>2020-08-03 14:33:06 +0000
commit061da546b983eb767bad15e67af1174fb0bcf31c (patch)
tree83c78b820819d70aa40c36d90447978b300078c5 /gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/symbols
parentImport LLVM 10.0.0 release including clang, lld and lldb. (diff)
downloadwireguard-openbsd-061da546b983eb767bad15e67af1174fb0bcf31c.tar.xz
wireguard-openbsd-061da546b983eb767bad15e67af1174fb0bcf31c.zip
Import LLVM 10.0.0 release including clang, lld and lldb.
ok hackroom tested by plenty
Diffstat (limited to 'gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/symbols')
-rw-r--r--gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/symbols/TestSymbols.py7
-rw-r--r--gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/symbols/main.cpp39
2 files changed, 46 insertions, 0 deletions
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/symbols/TestSymbols.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/symbols/TestSymbols.py
new file mode 100644
index 00000000000..af362f5be5d
--- /dev/null
+++ b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/symbols/TestSymbols.py
@@ -0,0 +1,7 @@
+from lldbsuite.test import lldbinline
+from lldbsuite.test import decorators
+
+lldbinline.MakeInlineTest(
+ __file__, globals(), [
+ decorators.expectedFailureAll(
+ oslist=["windows"], bugnumber="llvm.org/pr24764")])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/symbols/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/symbols/main.cpp
new file mode 100644
index 00000000000..cbd3ab253d6
--- /dev/null
+++ b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/symbols/main.cpp
@@ -0,0 +1,39 @@
+//===-- main.cpp ------------------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+void *D = 0;
+
+class D {
+ static int i;
+};
+
+int D::i = 3;
+
+namespace errno {
+ int j = 4;
+};
+
+int twice(int n)
+{
+ return n * 2; //% self.expect("expression -- D::i", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["int", "3"])
+ //% self.expect("expression -- D", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["void"])
+ //% self.expect("expression -- errno::j", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["int", "4"])
+}
+
+const char getAChar()
+{
+ const char D[] = "Hello world";
+ return D[0]; //% self.expect("expression -- D::i", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["int", "3"])
+ //% self.expect("expression -- D", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["char", "Hello"])
+}
+
+int main (int argc, char const *argv[])
+{
+ int six = twice(3);
+ return 0;
+}