summaryrefslogtreecommitdiffstats
path: root/lldb/test/functionalities/thread/jump/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/test/functionalities/thread/jump/main.cpp')
-rw-r--r--lldb/test/functionalities/thread/jump/main.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/lldb/test/functionalities/thread/jump/main.cpp b/lldb/test/functionalities/thread/jump/main.cpp
new file mode 100644
index 00000000000..b60fd4570bb
--- /dev/null
+++ b/lldb/test/functionalities/thread/jump/main.cpp
@@ -0,0 +1,34 @@
+//===-- main.cpp ------------------------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// This test verifies the correct handling of program counter jumps.
+
+int otherfn();
+
+template<typename T>
+T min(T a, T b)
+{
+ if (a < b)
+ {
+ return a; // 1st marker
+ } else {
+ return b; // 2nd marker
+ }
+}
+
+int main ()
+{
+ int i;
+ double j;
+
+ i = min(4, 5); // 3rd marker
+ j = min(7.0, 8.0); // 4th marker
+
+ return 0;
+}
OpenPOWER on IntegriCloud