diff --git a/lldb/test/API/lang/c/non-mangled/TestCNonMangled.py b/lldb/test/API/lang/c/non-mangled/TestCNonMangled.py index b10a3d6da30a1..6f7ef247b063a 100644 --- a/lldb/test/API/lang/c/non-mangled/TestCNonMangled.py +++ b/lldb/test/API/lang/c/non-mangled/TestCNonMangled.py @@ -1,10 +1,8 @@ import lldbsuite.test.lldbutil as lldbutil from lldbsuite.test.lldbtest import * -from lldbsuite.test.decorators import skipIfWindows class TestCase(TestBase): - @skipIfWindows def test_functions_having_dlang_mangling_prefix(self): """ Ensure C functions with a '_D' prefix alone are not mistakenly treated @@ -13,5 +11,14 @@ def test_functions_having_dlang_mangling_prefix(self): """ self.build() _, _, thread, _ = lldbutil.run_to_name_breakpoint(self, "_Dfunction") - symbol = thread.frame[0].symbol - self.assertEqual(symbol.GetDisplayName(), "_Dfunction") + frame = thread.frame[0] + + symbol = frame.symbol + # On Windows the function does not have an associated symbol. + if symbol.IsValid(): + self.assertFalse(symbol.mangled) + self.assertEqual(symbol.GetDisplayName(), "_Dfunction") + + function = frame.function + self.assertFalse(function.mangled) + self.assertEqual(function.GetDisplayName(), "_Dfunction")