1 volatile int x; 2 sink()3void __attribute__((noinline)) sink() { 4 x++; //% self.filecheck("bt", "main.cpp") 5 // CHECK-NOT: func{{[23]}}_amb 6 } 7 func3_amb()8void __attribute__((noinline)) func3_amb() { sink(); /* tail */ } 9 func2_amb()10void __attribute__((noinline)) func2_amb() { sink(); /* tail */ } 11 func1()12void __attribute__((noinline)) func1() { 13 if (x > 0) 14 func2_amb(); /* tail */ 15 else 16 func3_amb(); /* tail */ 17 } 18 main(int argc,char **)19int __attribute__((disable_tail_calls)) main(int argc, char **) { 20 // The sequences `main -> func1 -> f{2,3}_amb -> sink` are both plausible. Test 21 // that lldb doesn't attempt to guess which one occurred. 22 func1(); 23 return 0; 24 } 25