Index: lldb/packages/Python/lldbsuite/test/lldbtest.py =================================================================== --- lldb/packages/Python/lldbsuite/test/lldbtest.py +++ lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -2406,7 +2406,7 @@ "Unexpected failure with msg: " + eval_result.GetError().GetCString()) if result_type: - self.assertEqual(result_type, eval_result.GetTypeName()) + self.assertEqual(result_type, eval_result.GetDisplayTypeName()) if result_value: self.assertEqual(result_value, eval_result.GetValue()) Index: lldb/source/DataFormatters/FormatManager.cpp =================================================================== --- lldb/source/DataFormatters/FormatManager.cpp +++ lldb/source/DataFormatters/FormatManager.cpp @@ -193,7 +193,7 @@ entries.push_back( {type_name, reason, did_strip_ptr, did_strip_ref, did_strip_typedef}); - ConstString display_type_name(compiler_type.GetDisplayTypeName()); + ConstString display_type_name(compiler_type.GetTypeName()); if (display_type_name != type_name) entries.push_back({display_type_name, reason, did_strip_ptr, did_strip_ref, did_strip_typedef}); Index: lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp =================================================================== --- lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp +++ lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp @@ -159,7 +159,7 @@ if (!template_type) return false; - stream.Printf(" Active Type = %s ", template_type.GetTypeName().GetCString()); + stream << " Active Type = " << template_type.GetDisplayTypeName() << " "; return true; } Index: lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h =================================================================== --- lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h +++ lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h @@ -586,9 +586,7 @@ ConstString GetTypeName(lldb::opaque_compiler_type_t type) override; - ConstString GetDisplayTypeName(lldb::opaque_compiler_type_t type) override { - return GetTypeName(type); - } + ConstString GetDisplayTypeName(lldb::opaque_compiler_type_t type) override; uint32_t GetTypeInfo(lldb::opaque_compiler_type_t type, CompilerType *pointee_or_element_compiler_type) override; Index: lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp =================================================================== --- lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp +++ lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp @@ -3511,6 +3511,19 @@ return ConstString(qual_type.getAsString(printing_policy)); } +ConstString +TypeSystemClang::GetDisplayTypeName(lldb::opaque_compiler_type_t type) { + if (!type) + return ConstString(); + + clang::QualType qual_type(GetQualType(type)); + clang::PrintingPolicy printing_policy(getASTContext().getPrintingPolicy()); + printing_policy.SuppressTagKeyword = true; + printing_policy.SuppressScope = false; + printing_policy.SuppressUnwrittenScope = true; + return ConstString(qual_type.getAsString(printing_policy)); +} + uint32_t TypeSystemClang::GetTypeInfo(lldb::opaque_compiler_type_t type, CompilerType *pointee_or_element_clang_type) { Index: lldb/test/API/commands/expression/import-std-module/basic/TestImportStdModule.py =================================================================== --- lldb/test/API/commands/expression/import-std-module/basic/TestImportStdModule.py +++ lldb/test/API/commands/expression/import-std-module/basic/TestImportStdModule.py @@ -25,7 +25,7 @@ self.expect_expr("std::abs(-42)", result_type="int", result_value="42") self.expect_expr("std::div(2, 1).quot", result_type="int", result_value="2") # Using types from std. - self.expect_expr("(std::size_t)33U", result_type="size_t", result_value="33") + self.expect_expr("(std::size_t)33U", result_type="std::size_t", result_value="33") # Calling templated functions that return non-template types. self.expect_expr("char char_a = 'b'; char char_b = 'a'; std::swap(char_a, char_b); char_a", result_type="char", result_value="'a'") Index: lldb/test/API/commands/expression/import-std-module/conflicts/TestStdModuleWithConflicts.py =================================================================== --- lldb/test/API/commands/expression/import-std-module/conflicts/TestStdModuleWithConflicts.py +++ lldb/test/API/commands/expression/import-std-module/conflicts/TestStdModuleWithConflicts.py @@ -27,6 +27,6 @@ self.runCmd("settings set target.import-std-module true") self.expect_expr("std::abs(-42)", result_type="int", result_value="42") self.expect_expr("std::div(2, 1).quot", result_type="int", result_value="2") - self.expect_expr("(std::size_t)33U", result_type="size_t", result_value="33") + self.expect_expr("(std::size_t)33U", result_type="std::size_t", result_value="33") self.expect("expr char char_a = 'b'; char char_b = 'a'; std::swap(char_a, char_b); char_a", substrs=["(char) $3 = 'a'"]) Index: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/forward_list/TestDataFormatterLibcxxForwardList.py =================================================================== --- lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/forward_list/TestDataFormatterLibcxxForwardList.py +++ lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/forward_list/TestDataFormatterLibcxxForwardList.py @@ -17,8 +17,7 @@ def setUp(self): TestBase.setUp(self) self.line = line_number('main.cpp', '// break here') - ns = 'ndk' if lldbplatformutil.target_is_android() else '' - self.namespace = 'std::__' + ns + '1' + self.namespace = 'std' @add_test_categories(["libc++"]) def test(self): Index: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py =================================================================== --- lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py +++ lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py @@ -19,8 +19,7 @@ TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') - ns = 'ndk' if lldbplatformutil.target_is_android() else '' - self.namespace = 'std::__' + ns + '1' + self.namespace = 'std' @add_test_categories(["libc++"]) def test_with_run_command(self): Index: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py =================================================================== --- lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py +++ lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py @@ -17,7 +17,7 @@ def setUp(self): TestBase.setUp(self) ns = 'ndk' if lldbplatformutil.target_is_android() else '' - self.namespace = 'std::__' + ns + '1' + self.namespace = 'std' @add_test_categories(["libc++"]) def test_with_run_command(self): Index: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py =================================================================== --- lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py +++ lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py @@ -17,8 +17,7 @@ def setUp(self): TestBase.setUp(self) - ns = 'ndk' if lldbplatformutil.target_is_android() else '' - self.namespace = 'std::__' + ns + '1' + self.namespace = 'std' @add_test_categories(["libc++"]) def test_with_run_command(self): Index: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py =================================================================== --- lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py +++ lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py @@ -16,13 +16,12 @@ def setUp(self): TestBase.setUp(self) - ns = 'ndk' if lldbplatformutil.target_is_android() else '' - self.namespace = 'std::__' + ns + '1' + self.namespace = 'std' def getVariableType(self, name): var = self.frame().FindVariable(name) self.assertTrue(var.IsValid()) - return var.GetType().GetCanonicalType().GetName() + return var.GetType().GetDisplayTypeName() def check_ii(self, var_name): """ This checks the value of the bitset stored in ii at the call to by_ref_and_ptr. Index: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/main.cpp =================================================================== --- lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/main.cpp +++ lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/main.cpp @@ -1,9 +1,6 @@ #include #include -typedef std::multiset intset; -typedef std::multiset stringset; - int g_the_foo = 0; int thefoo_rw(int arg = 1) @@ -16,7 +13,7 @@ return g_the_foo; } -void by_ref_and_ptr(intset &ref, intset *ptr) +void by_ref_and_ptr(std::multiset &ref, std::multiset *ptr) { // Stop here to check by ref and ptr return; @@ -24,7 +21,7 @@ int main() { - intset ii; + std::multiset ii; thefoo_rw(1); // Set break point at this line. ii.insert(0); @@ -43,7 +40,7 @@ ii.clear(); thefoo_rw(1); // Set break point at this line. - stringset ss; + std::multiset ss; thefoo_rw(1); // Set break point at this line. ss.insert("a"); Index: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/queue/TestDataFormatterLibcxxQueue.py =================================================================== --- lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/queue/TestDataFormatterLibcxxQueue.py +++ lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/queue/TestDataFormatterLibcxxQueue.py @@ -16,15 +16,14 @@ def setUp(self): TestBase.setUp(self) - ns = 'ndk' if lldbplatformutil.target_is_android() else '' - self.namespace = 'std::__' + ns + '1' + self.namespace = 'std' def check_variable(self, name): var = self.frame().FindVariable(name) self.assertTrue(var.IsValid()) queue = self.namespace + '::queue' - self.assertTrue(queue in var.GetTypeName()) + self.assertTrue(queue in var.GetDisplayTypeName()) self.assertEqual(var.GetNumChildren(), 5) for i in range(5): ch = var.GetChildAtIndex(i) Index: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py =================================================================== --- lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py +++ lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py @@ -16,13 +16,12 @@ def setUp(self): TestBase.setUp(self) - ns = 'ndk' if lldbplatformutil.target_is_android() else '' - self.namespace = 'std::__' + ns + '1' + self.namespace = 'std' def getVariableType(self, name): var = self.frame().FindVariable(name) self.assertTrue(var.IsValid()) - return var.GetType().GetCanonicalType().GetName() + return var.GetType().GetDisplayTypeName() def check_ii(self, var_name): """ This checks the value of the bitset stored in ii at the call to by_ref_and_ptr. Index: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/set/main.cpp =================================================================== --- lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/set/main.cpp +++ lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/set/main.cpp @@ -1,9 +1,6 @@ #include #include -typedef std::set intset; -typedef std::set stringset; - int g_the_foo = 0; int thefoo_rw(int arg = 1) @@ -16,7 +13,7 @@ return g_the_foo; } -void by_ref_and_ptr(intset &ref, intset *ptr) +void by_ref_and_ptr(std::set &ref, std::set *ptr) { // Stop here to check by ref and ptr return; @@ -24,7 +21,7 @@ int main() { - intset ii; + std::set ii; thefoo_rw(1); // Set break point at this line. ii.insert(0); @@ -43,7 +40,7 @@ ii.clear(); thefoo_rw(1); // Set break point at this line. - stringset ss; + std::set ss; thefoo_rw(1); // Set break point at this line. ss.insert("a"); Index: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py =================================================================== --- lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py +++ lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py @@ -20,8 +20,7 @@ TestBase.setUp(self) # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') - ns = 'ndk' if lldbplatformutil.target_is_android() else '' - self.namespace = 'std::__' + ns + '1' + self.namespace = 'std' @add_test_categories(["libc++"]) @expectedFailureAll(bugnumber="llvm.org/pr36109", debug_info="gmodules", triple=".*-android") Index: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/TestDataFormatterLibcxxTuple.py =================================================================== --- lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/TestDataFormatterLibcxxTuple.py +++ lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/TestDataFormatterLibcxxTuple.py @@ -17,8 +17,7 @@ def setUp(self): TestBase.setUp(self) self.line = line_number('main.cpp', '// break here') - ns = 'ndk' if lldbplatformutil.target_is_android() else '' - self.namespace = 'std::__' + ns + '1' + self.namespace = 'std' @add_test_categories(["libc++"]) def test(self): Index: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py =================================================================== --- lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py +++ lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py @@ -16,8 +16,7 @@ def setUp(self): TestBase.setUp(self) - ns = 'ndk' if lldbplatformutil.target_is_android() else '' - self.namespace = 'std::__' + ns + '1' + self.namespace = 'std' @add_test_categories(["libc++"]) def test_with_run_command(self): Index: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/variant/TestDataFormatterLibcxxVariant.py =================================================================== --- lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/variant/TestDataFormatterLibcxxVariant.py +++ lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/variant/TestDataFormatterLibcxxVariant.py @@ -51,7 +51,7 @@ '}']) self.expect("frame variable v_v1", - substrs=['v_v1 = Active Type = std::__1::variant {', + substrs=['v_v1 = Active Type = std::variant {', 'Value = Active Type = int {', 'Value = 12', '}', Index: lldb/test/Shell/SymbolFile/NativePDB/ast-types.cpp =================================================================== --- lldb/test/Shell/SymbolFile/NativePDB/ast-types.cpp +++ lldb/test/Shell/SymbolFile/NativePDB/ast-types.cpp @@ -102,9 +102,9 @@ // CHECK: (A::C<-1>::D) ACNeg1D = (ACDMember = 0, CPtr = 0x{{0+}}) // CHECK: (A::D) AD = {} // CHECK: (A::D::E) ADE = (ADDMember = 0) -// CHECK: ((anonymous namespace)::Anonymous) AnonInt = (AnonymousMember = 0) -// CHECK: ((anonymous namespace)::Anonymous>) AnonABCVoid = (AnonymousMember = 0) -// CHECK: ((anonymous namespace)::Anonymous>::D) AnonABCVoidD = (AnonymousDMember = 0) +// CHECK: (Anonymous) AnonInt = (AnonymousMember = 0) +// CHECK: (Anonymous>) AnonABCVoid = (AnonymousMember = 0) +// CHECK: (Anonymous>::D) AnonABCVoidD = (AnonymousDMember = 0) // CHECK: Dumping clang ast for 1 modules. // CHECK: TranslationUnitDecl {{.*}} // CHECK: |-CXXRecordDecl {{.*}} class TrivialC definition