diff --git a/lldb/test/API/commands/expression/import-std-module/deque-basic/TestDequeFromStdModule.py b/lldb/test/API/commands/expression/import-std-module/deque-basic/TestDequeFromStdModule.py --- a/lldb/test/API/commands/expression/import-std-module/deque-basic/TestDequeFromStdModule.py +++ b/lldb/test/API/commands/expression/import-std-module/deque-basic/TestDequeFromStdModule.py @@ -20,7 +20,7 @@ self.runCmd("settings set target.import-std-module true") - if self.expectedCompilerVersion(['>', '16.0']): + if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(['>', '16.0']): deque_type = "std::deque" else: deque_type = "std::deque >" diff --git a/lldb/test/API/commands/expression/import-std-module/deque-dbg-info-content/TestDbgInfoContentDequeFromStdModule.py b/lldb/test/API/commands/expression/import-std-module/deque-dbg-info-content/TestDbgInfoContentDequeFromStdModule.py --- a/lldb/test/API/commands/expression/import-std-module/deque-dbg-info-content/TestDbgInfoContentDequeFromStdModule.py +++ b/lldb/test/API/commands/expression/import-std-module/deque-dbg-info-content/TestDbgInfoContentDequeFromStdModule.py @@ -21,7 +21,7 @@ self.runCmd("settings set target.import-std-module true") - if self.expectedCompilerVersion(['>', '16.0']): + if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(['>', '16.0']): deque_type = "std::deque" else: deque_type = "std::deque >" diff --git a/lldb/test/API/commands/expression/import-std-module/forward_list-dbg-info-content/TestDbgInfoContentForwardListFromStdModule.py b/lldb/test/API/commands/expression/import-std-module/forward_list-dbg-info-content/TestDbgInfoContentForwardListFromStdModule.py --- a/lldb/test/API/commands/expression/import-std-module/forward_list-dbg-info-content/TestDbgInfoContentForwardListFromStdModule.py +++ b/lldb/test/API/commands/expression/import-std-module/forward_list-dbg-info-content/TestDbgInfoContentForwardListFromStdModule.py @@ -20,7 +20,7 @@ self.runCmd("settings set target.import-std-module true") - if self.expectedCompilerVersion(['>', '16.0']): + if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(['>', '16.0']): list_type = "std::forward_list" else: list_type = "std::forward_list >" diff --git a/lldb/test/API/commands/expression/import-std-module/forward_list/TestForwardListFromStdModule.py b/lldb/test/API/commands/expression/import-std-module/forward_list/TestForwardListFromStdModule.py --- a/lldb/test/API/commands/expression/import-std-module/forward_list/TestForwardListFromStdModule.py +++ b/lldb/test/API/commands/expression/import-std-module/forward_list/TestForwardListFromStdModule.py @@ -20,7 +20,7 @@ self.runCmd("settings set target.import-std-module true") - if self.expectedCompilerVersion(['>', '16.0']): + if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(['>', '16.0']): list_type = "std::forward_list" else: list_type = "std::forward_list >" diff --git a/lldb/test/API/commands/expression/import-std-module/list-dbg-info-content/TestDbgInfoContentListFromStdModule.py b/lldb/test/API/commands/expression/import-std-module/list-dbg-info-content/TestDbgInfoContentListFromStdModule.py --- a/lldb/test/API/commands/expression/import-std-module/list-dbg-info-content/TestDbgInfoContentListFromStdModule.py +++ b/lldb/test/API/commands/expression/import-std-module/list-dbg-info-content/TestDbgInfoContentListFromStdModule.py @@ -22,7 +22,7 @@ self.runCmd("settings set target.import-std-module true") - if self.expectedCompilerVersion(['>', '16.0']): + if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(['>', '16.0']): list_type = "std::list" else: list_type = "std::list >" diff --git a/lldb/test/API/commands/expression/import-std-module/list/TestListFromStdModule.py b/lldb/test/API/commands/expression/import-std-module/list/TestListFromStdModule.py --- a/lldb/test/API/commands/expression/import-std-module/list/TestListFromStdModule.py +++ b/lldb/test/API/commands/expression/import-std-module/list/TestListFromStdModule.py @@ -20,7 +20,7 @@ self.runCmd("settings set target.import-std-module true") - if self.expectedCompilerVersion(['>', '16.0']): + if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(['>', '16.0']): list_type = "std::list" else: list_type = "std::list >" diff --git a/lldb/test/API/commands/expression/import-std-module/non-module-type-separation/TestNonModuleTypeSeparation.py b/lldb/test/API/commands/expression/import-std-module/non-module-type-separation/TestNonModuleTypeSeparation.py --- a/lldb/test/API/commands/expression/import-std-module/non-module-type-separation/TestNonModuleTypeSeparation.py +++ b/lldb/test/API/commands/expression/import-std-module/non-module-type-separation/TestNonModuleTypeSeparation.py @@ -31,7 +31,7 @@ ValueCheck(value="2"), ] - if self.expectedCompilerVersion(['>', '16.0']): + if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(['>', '16.0']): vector_type = "std::vector" dbg_vec_type = "std::vector" module_vector_type = "std::vector" diff --git a/lldb/test/API/commands/expression/import-std-module/queue/TestQueueFromStdModule.py b/lldb/test/API/commands/expression/import-std-module/queue/TestQueueFromStdModule.py --- a/lldb/test/API/commands/expression/import-std-module/queue/TestQueueFromStdModule.py +++ b/lldb/test/API/commands/expression/import-std-module/queue/TestQueueFromStdModule.py @@ -20,7 +20,7 @@ self.runCmd("settings set target.import-std-module true") - if self.expectedCompilerVersion(['>', '16.0']): + if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(['>', '16.0']): queue_type = "std::queue" else: queue_type = "std::queue > >" @@ -56,7 +56,7 @@ result_value="5") # Test std::queue functionality with a std::list. - if self.expectedCompilerVersion(['>', '16.0']): + if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(['>', '16.0']): queue_type = "std::queue >" else: queue_type = "std::queue > >" diff --git a/lldb/test/API/commands/expression/import-std-module/retry-with-std-module/TestRetryWithStdModule.py b/lldb/test/API/commands/expression/import-std-module/retry-with-std-module/TestRetryWithStdModule.py --- a/lldb/test/API/commands/expression/import-std-module/retry-with-std-module/TestRetryWithStdModule.py +++ b/lldb/test/API/commands/expression/import-std-module/retry-with-std-module/TestRetryWithStdModule.py @@ -14,7 +14,7 @@ "// Set break point at this line.", lldb.SBFileSpec("main.cpp")) - if self.expectedCompilerVersion(['>', '16.0']): + if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(['>', '16.0']): vec_type = "std::vector" else: vec_type = "std::vector >" diff --git a/lldb/test/API/commands/expression/import-std-module/unique_ptr-dbg-info-content/TestUniquePtrDbgInfoContent.py b/lldb/test/API/commands/expression/import-std-module/unique_ptr-dbg-info-content/TestUniquePtrDbgInfoContent.py --- a/lldb/test/API/commands/expression/import-std-module/unique_ptr-dbg-info-content/TestUniquePtrDbgInfoContent.py +++ b/lldb/test/API/commands/expression/import-std-module/unique_ptr-dbg-info-content/TestUniquePtrDbgInfoContent.py @@ -22,7 +22,7 @@ self.runCmd("settings set target.import-std-module true") - if self.expectedCompilerVersion(['>', '16.0']): + if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(['>', '16.0']): ptr_type = "std::unique_ptr" else: ptr_type = "std::unique_ptr >" diff --git a/lldb/test/API/commands/expression/import-std-module/unique_ptr/TestUniquePtrFromStdModule.py b/lldb/test/API/commands/expression/import-std-module/unique_ptr/TestUniquePtrFromStdModule.py --- a/lldb/test/API/commands/expression/import-std-module/unique_ptr/TestUniquePtrFromStdModule.py +++ b/lldb/test/API/commands/expression/import-std-module/unique_ptr/TestUniquePtrFromStdModule.py @@ -22,7 +22,7 @@ self.runCmd("settings set target.import-std-module true") - if self.expectedCompilerVersion(['>', '16.0']): + if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(['>', '16.0']): ptr_type = "std::unique_ptr" else: ptr_type = "std::unique_ptr >" diff --git a/lldb/test/API/commands/expression/import-std-module/vector-dbg-info-content/TestDbgInfoContentVectorFromStdModule.py b/lldb/test/API/commands/expression/import-std-module/vector-dbg-info-content/TestDbgInfoContentVectorFromStdModule.py --- a/lldb/test/API/commands/expression/import-std-module/vector-dbg-info-content/TestDbgInfoContentVectorFromStdModule.py +++ b/lldb/test/API/commands/expression/import-std-module/vector-dbg-info-content/TestDbgInfoContentVectorFromStdModule.py @@ -22,7 +22,7 @@ self.runCmd("settings set target.import-std-module true") - if self.expectedCompilerVersion(['>', '16.0']): + if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(['>', '16.0']): vector_type = "std::vector" else: vector_type = "std::vector >" diff --git a/lldb/test/API/commands/expression/import-std-module/vector-of-vectors/TestVectorOfVectorsFromStdModule.py b/lldb/test/API/commands/expression/import-std-module/vector-of-vectors/TestVectorOfVectorsFromStdModule.py --- a/lldb/test/API/commands/expression/import-std-module/vector-of-vectors/TestVectorOfVectorsFromStdModule.py +++ b/lldb/test/API/commands/expression/import-std-module/vector-of-vectors/TestVectorOfVectorsFromStdModule.py @@ -18,7 +18,7 @@ "// Set break point at this line.", lldb.SBFileSpec("main.cpp")) - if self.expectedCompilerVersion(['>', '16.0']): + if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(['>', '16.0']): vector_type = "std::vector" vector_of_vector_type = "std::vector >" else: diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/shared_ptr/TestDataFormatterLibcxxSharedPtr.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/shared_ptr/TestDataFormatterLibcxxSharedPtr.py --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/shared_ptr/TestDataFormatterLibcxxSharedPtr.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/shared_ptr/TestDataFormatterLibcxxSharedPtr.py @@ -58,7 +58,7 @@ self.assertRegex(valobj.summary, r"^10( strong=1)? weak=1$") self.assertNotEqual(valobj.child[0].unsigned, 0) - if self.expectedCompilerVersion(['>', '16.0']): + if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(['>', '16.0']): string_type = "std::basic_string" else: string_type = "std::basic_string, std::allocator >" diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py @@ -52,7 +52,7 @@ ns = self.namespace - if self.expectedCompilerVersion(['>', '16.0']): + if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(['>', '16.0']): expected_basic_string = '%s::basic_string'%ns else: expected_basic_string = '%s::basic_string, ' \ diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string_view/TestDataFormatterLibcxxStringView.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string_view/TestDataFormatterLibcxxStringView.py --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string_view/TestDataFormatterLibcxxStringView.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string_view/TestDataFormatterLibcxxStringView.py @@ -56,7 +56,7 @@ # Execute the cleanup function during test case tear down. self.addTearDownHook(cleanup) - if self.expectedCompilerVersion(['>', '16.0']): + if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(['>', '16.0']): expected_basic_string = 'std::basic_string' expected_basic_string_view = 'std::basic_string_view' else: diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unique_ptr/TestDataFormatterLibcxxUniquePtr.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unique_ptr/TestDataFormatterLibcxxUniquePtr.py --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unique_ptr/TestDataFormatterLibcxxUniquePtr.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unique_ptr/TestDataFormatterLibcxxUniquePtr.py @@ -15,13 +15,13 @@ if qualifiers: qualifiers = ' ' + qualifiers - if self.expectedCompilerVersion(['>', '16.0']): + if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(['>', '16.0']): return f'std::unique_ptr<{pointee_type}>{qualifiers}' else: return f'std::unique_ptr<{pointee_type}, std::default_delete<{pointee_type}> >{qualifiers}' def make_expected_basic_string_ptr(self) -> str: - if self.expectedCompilerVersion(['>', '16.0']): + if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(['>', '16.0']): return f'std::unique_ptr >' else: return 'std::unique_ptr, std::allocator >, ' \