1 /* Test demangling an Objective-C method. */
3 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
10 @interface DemangleTest
14 + (int) testFunction1;
15 + (int) test_function2;
16 + (int) __testFunction3: (int)unused andArgument: (char)unused2;
20 @implementation DemangleTest
23 std::cout << __PRETTY_FUNCTION__ << "\n";
24 return std::strcmp (__PRETTY_FUNCTION__, "+[DemangleTest testFunction1]");
26 + (int) test_function2
28 std::cout << __PRETTY_FUNCTION__ << "\n";
29 return std::strcmp (__PRETTY_FUNCTION__, "+[DemangleTest test_function2]");
31 + (int) __testFunction3: (int)unused andArgument: (char)unused2
33 std::cout << __PRETTY_FUNCTION__ << "\n";
34 return std::strcmp (__PRETTY_FUNCTION__, "+[DemangleTest __testFunction3:andArgument:]");
36 + (id) initialize { return self; }
41 if ([DemangleTest testFunction1] != 0)
44 if ([DemangleTest test_function2] != 0)
47 if ([DemangleTest __testFunction3:0 andArgument: 'c'] != 0)