diff options
author | 2020-08-03 14:33:06 +0000 | |
---|---|---|
committer | 2020-08-03 14:33:06 +0000 | |
commit | 061da546b983eb767bad15e67af1174fb0bcf31c (patch) | |
tree | 83c78b820819d70aa40c36d90447978b300078c5 /gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates | |
parent | Import LLVM 10.0.0 release including clang, lld and lldb. (diff) | |
download | wireguard-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/gmodules-templates')
6 files changed, 47 insertions, 0 deletions
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/TestGModules.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/TestGModules.py new file mode 100644 index 00000000000..69d04636d86 --- /dev/null +++ b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/TestGModules.py @@ -0,0 +1,6 @@ +import lldbsuite.test.lldbinline as lldbinline +from lldbsuite.test.decorators import * + +lldbinline.MakeInlineTest(__file__, globals(), [ + expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr36107", + debug_info="gmodules")]) diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/a.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/a.h new file mode 100644 index 00000000000..7384f230801 --- /dev/null +++ b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/a.h @@ -0,0 +1,7 @@ +#include "memory.h" + +class MemoryBuffer { int buffer = 42; }; + +struct SrcBuffer { + my_std::unique_ptr<MemoryBuffer> Buffer; +}; diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/b.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/b.h new file mode 100644 index 00000000000..b777e8e3473 --- /dev/null +++ b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/b.h @@ -0,0 +1,6 @@ +#include "a.h" +#include "memory.h" + +class Module { + my_std::unique_ptr<MemoryBuffer> MBptr; +}; diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/main.cpp new file mode 100644 index 00000000000..df752616570 --- /dev/null +++ b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/main.cpp @@ -0,0 +1,9 @@ +#include "b.h" + +int main(int argc, const char * argv[]) +{ + Module m; + // Test that the type Module which contains a field that is a + // template instantiation can be fully resolved. + return 0; //% self.assertTrue(self.frame().FindVariable('m').GetChildAtIndex(0).GetChildAtIndex(0).GetChildAtIndex(0).GetName() == 'buffer', 'find template specializations in imported modules') +} diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/memory.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/memory.h new file mode 100644 index 00000000000..1d59dc0bbf0 --- /dev/null +++ b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/memory.h @@ -0,0 +1,8 @@ +#ifndef MEMORY_H +#define MEMORY_H +namespace my_std { + template<class T> class unique_ptr { + T t; + }; +} +#endif diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/module.modulemap b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/module.modulemap new file mode 100644 index 00000000000..2f05073a0b8 --- /dev/null +++ b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/module.modulemap @@ -0,0 +1,11 @@ +module A { + header "a.h" +} + +module B { + header "b.h" +} + +module std { + header "memory.h" +} |