summaryrefslogtreecommitdiffstats
path: root/lldb/tools/lldb-perf/common/stepping/stepping-testcase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/tools/lldb-perf/common/stepping/stepping-testcase.cpp')
-rw-r--r--lldb/tools/lldb-perf/common/stepping/stepping-testcase.cpp65
1 files changed, 29 insertions, 36 deletions
diff --git a/lldb/tools/lldb-perf/common/stepping/stepping-testcase.cpp b/lldb/tools/lldb-perf/common/stepping/stepping-testcase.cpp
index f842c2379c1..50f0164a217 100644
--- a/lldb/tools/lldb-perf/common/stepping/stepping-testcase.cpp
+++ b/lldb/tools/lldb-perf/common/stepping/stepping-testcase.cpp
@@ -1,42 +1,35 @@
#include <stdio.h>
-#include <vector>
#include <string>
+#include <vector>
+
+struct struct_for_copying {
+ struct_for_copying(int in_int, double in_double, const char *in_string)
+ : int_value(in_int), double_value(in_double), string_value(in_string) {}
+ struct_for_copying() { struct_for_copying(0, 0, ""); }
-struct struct_for_copying
-{
- struct_for_copying (int in_int, double in_double, const char *in_string) :
- int_value(in_int),
- double_value(in_double),
- string_value (in_string)
- {
-
- }
- struct_for_copying()
- {
- struct_for_copying (0, 0, "");
- }
-
- int int_value;
- double double_value;
- std::string string_value;
+ int int_value;
+ double double_value;
+ std::string string_value;
};
-int main (int argc, char **argv)
-{
- struct_for_copying input_struct (150 * argc, 10.0 * argc, argv[0]);
- struct_for_copying output_struct;
- int some_int = 44;
- double some_double = 34.5;
- double other_double;
- size_t vector_size;
- std::vector<struct_for_copying> my_vector;
-
- printf ("Here is some code to stop at originally. Got: %d, %p.\n", argc, argv);
- output_struct = input_struct;
- other_double = (some_double * some_int)/((double) argc);
- other_double = other_double > 0 ? some_double/other_double : some_double > 0 ? other_double/some_double : 10.0;
- my_vector.push_back (input_struct);
- vector_size = my_vector.size();
-
- return vector_size == 0 ? 0 : 1;
+int main(int argc, char **argv) {
+ struct_for_copying input_struct(150 * argc, 10.0 * argc, argv[0]);
+ struct_for_copying output_struct;
+ int some_int = 44;
+ double some_double = 34.5;
+ double other_double;
+ size_t vector_size;
+ std::vector<struct_for_copying> my_vector;
+
+ printf("Here is some code to stop at originally. Got: %d, %p.\n", argc,
+ argv);
+ output_struct = input_struct;
+ other_double = (some_double * some_int) / ((double)argc);
+ other_double = other_double > 0
+ ? some_double / other_double
+ : some_double > 0 ? other_double / some_double : 10.0;
+ my_vector.push_back(input_struct);
+ vector_size = my_vector.size();
+
+ return vector_size == 0 ? 0 : 1;
}
OpenPOWER on IntegriCloud