summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r--lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/TestStdModuleSysroot.py4
-rw-r--r--lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/main.cpp1
-rw-r--r--lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/include/algorithm7
-rw-r--r--lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/algorithm11
-rw-r--r--lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/module.modulemap (renamed from lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/include/module.modulemap)0
6 files changed, 16 insertions, 9 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/Makefile b/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/Makefile
index c1790dfbf76..4915cdae876 100644
--- a/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/Makefile
@@ -3,7 +3,7 @@
# system headers.
NO_TEST_COMMON_H := 1
-CXXFLAGS_EXTRAS = -I $(SRCDIR)/root/usr/include/c++/include/ -I $(SRCDIR)/root/usr/include/ -nostdinc -nostdinc++
+CXXFLAGS_EXTRAS = -I $(SRCDIR)/root/usr/include/c++/v1/ -I $(SRCDIR)/root/usr/include/ -nostdinc -nostdinc++
CXX_SOURCES := main.cpp
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/TestStdModuleSysroot.py b/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/TestStdModuleSysroot.py
index fbf00cddcfa..90072fc3fdf 100644
--- a/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/TestStdModuleSysroot.py
+++ b/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/TestStdModuleSysroot.py
@@ -27,4 +27,6 @@ class ImportStdModule(TestBase):
# Call our custom function in our sysroot std module.
# If this gives us the correct result, then we used the sysroot.
- self.expect("expr std::myabs(-42)", substrs=['(int) $0 = 42'])
+ # We rely on the default argument of -123 to make sure we actually have the C++ module.
+ # (We don't have default arguments in the debug information).
+ self.expect("expr std::myabs()", substrs=['(int) $0 = 123'])
diff --git a/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/main.cpp b/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/main.cpp
index 2fbc76b9a76..c01fadc5d8e 100644
--- a/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/main.cpp
+++ b/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/main.cpp
@@ -2,5 +2,6 @@
int main(int argc, char **argv) {
libc_struct s;
+ std::vector v;
return 0; // Set break point at this line.
}
diff --git a/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/include/algorithm b/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/include/algorithm
deleted file mode 100644
index e8cbcca8e84..00000000000
--- a/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/include/algorithm
+++ /dev/null
@@ -1,7 +0,0 @@
-#include "libc_header.h"
-
-namespace std {
- int myabs(int i) {
- return i < 0 ? -i : i;
- }
-}
diff --git a/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/algorithm b/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/algorithm
new file mode 100644
index 00000000000..43f7becdbeb
--- /dev/null
+++ b/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/algorithm
@@ -0,0 +1,11 @@
+#include "libc_header.h"
+
+namespace std {
+ // Makes sure we get a support file for this header.
+ struct vector { int i; };
+
+ inline int myabs(int i = -123) {
+ double nil;
+ return i < 0 ? -i : i;
+ }
+}
diff --git a/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/include/module.modulemap b/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/module.modulemap
index 0eb48492a65..0eb48492a65 100644
--- a/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/include/module.modulemap
+++ b/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/module.modulemap
OpenPOWER on IntegriCloud