diff options
author | Raphael Isemann <teemperor@gmail.com> | 2019-09-30 08:52:16 +0000 |
---|---|---|
committer | Raphael Isemann <teemperor@gmail.com> | 2019-09-30 08:52:16 +0000 |
commit | e7714fe7bff811785eeac2b7627ca4293565aa65 (patch) | |
tree | 336243a341600eebbaf887f6084afbbd16764163 /lldb/packages/Python | |
parent | e3b4f0ec2566133df9fcb952c441cc43ceb5864d (diff) | |
download | bcm5719-llvm-e7714fe7bff811785eeac2b7627ca4293565aa65.tar.gz bcm5719-llvm-e7714fe7bff811785eeac2b7627ca4293565aa65.zip |
[lldb][clang][modern-type-lookup] Use ASTImporterSharedState in ExternalASTMerger
Summary:
The ExternalASTMerger should use the ASTImporterSharedState. This allows it to
handle std::pair in LLDB (but the rest of libc++ is still work in progress).
Reviewers: martong, shafik, a.sidorin
Subscribers: rnkovacs, christof, JDevlieghere, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68140
llvm-svn: 373193
Diffstat (limited to 'lldb/packages/Python')
3 files changed, 29 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/Makefile new file mode 100644 index 00000000000..574c53d7cb1 --- /dev/null +++ b/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/Makefile @@ -0,0 +1,3 @@ +CXX_SOURCES := main.cpp +USE_LIBCPP := 1 +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/TestLibCxxModernTypeLookup.py b/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/TestLibCxxModernTypeLookup.py new file mode 100644 index 00000000000..a33c75494ec --- /dev/null +++ b/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/TestLibCxxModernTypeLookup.py @@ -0,0 +1,20 @@ +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + +class LibcxxModernTypeLookup(TestBase): + + mydir = TestBase.compute_mydir(__file__) + + @add_test_categories(["libc++"]) + def test(self): + self.build() + + # Activate modern-type-lookup. + self.runCmd("settings set target.experimental.use-modern-type-lookup true") + + lldbutil.run_to_source_breakpoint(self, + "// Set break point at this line.", lldb.SBFileSpec("main.cpp")) + + # Test a few simple expressions that should still work with modern-type-lookup. + self.expect("expr pair", substrs=["(std::", "pair<int, long", "= (first = 1, second = 2)"]) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/main.cpp b/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/main.cpp new file mode 100644 index 00000000000..6db6160ba62 --- /dev/null +++ b/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/main.cpp @@ -0,0 +1,6 @@ +#include <utility> + +int main(int argc, char **argv) { + std::pair<int, long> pair = std::make_pair<int, float>(1, 2L); + return pair.first; // Set break point at this line. +} |