Author: teemperor Date: Mon Sep 30 01:52:16 2019 New Revision: 373193 URL: http://llvm.org/viewvc/llvm-project?rev=373193&view=rev Log: [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 Added: lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/ lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/Makefile lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/TestLibCxxModernTypeLookup.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/main.cpp Added: lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/Makefile URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/Makefile?rev=373193&view=auto ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/Makefile (added) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/Makefile Mon Sep 30 01:52:16 2019 @@ -0,0 +1,3 @@ +CXX_SOURCES := main.cpp +USE_LIBCPP := 1 +include Makefile.rules Added: lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/TestLibCxxModernTypeLookup.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/TestLibCxxModernTypeLookup.py?rev=373193&view=auto ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/TestLibCxxModernTypeLookup.py (added) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/TestLibCxxModernTypeLookup.py Mon Sep 30 01:52:16 2019 @@ -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)"]) Added: lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/main.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/main.cpp?rev=373193&view=auto ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/main.cpp (added) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/main.cpp Mon Sep 30 01:52:16 2019 @@ -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. +} _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits