summaryrefslogtreecommitdiffstats
path: root/lldb/tools/lldb-perf
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-03-27 20:13:09 +0000
committerGreg Clayton <gclayton@apple.com>2013-03-27 20:13:09 +0000
commitff267c7fa0ee826aea03ee3cb2df2ca33f9599b4 (patch)
treed69554bd6eb3eb792d38b91cc631c072c91ce0f0 /lldb/tools/lldb-perf
parentf81f751722ec51f9e471b9e1d08df8bfb3db4991 (diff)
downloadbcm5719-llvm-ff267c7fa0ee826aea03ee3cb2df2ca33f9599b4.tar.gz
bcm5719-llvm-ff267c7fa0ee826aea03ee3cb2df2ca33f9599b4.zip
Added a source file needed for clang to compile in the lldb_perf_clang test.
llvm-svn: 178176
Diffstat (limited to 'lldb/tools/lldb-perf')
-rw-r--r--lldb/tools/lldb-perf/common/clang/main.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/lldb/tools/lldb-perf/common/clang/main.cpp b/lldb/tools/lldb-perf/common/clang/main.cpp
new file mode 100644
index 00000000000..709c3946fb2
--- /dev/null
+++ b/lldb/tools/lldb-perf/common/clang/main.cpp
@@ -0,0 +1,24 @@
+#include <stdio.h>
+#include <stdint.h>
+#include <vector>
+
+namespace {
+ struct Foo
+ {
+ int i; int j;
+ };
+ void doit (const Foo &foo)
+ {
+ printf ("doit(%i)\n", foo.i);
+ }
+}
+int main (int argc, char const *argv[], char const *envp[])
+{
+ std::vector<int> ints;
+ for (int i=0;i<10;++i)
+ ints.push_back(i);
+ printf ("hello world\n");
+ Foo foo = { 12, 13 };
+ doit (foo);
+ return 0;
+}
OpenPOWER on IntegriCloud