[lldb-instr] Add constructor and move test into lit/tools

The test had an implicit constructor for the Foo struct. Also, as the
instrumentation doesn't have to be reproducer specific, I moved the
tests into the lit/tools directory.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@354294 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lit/Reproducer/Inputs/foo.cpp b/lit/Reproducer/Inputs/foo.cpp
deleted file mode 100644
index c4fa860..0000000
--- a/lit/Reproducer/Inputs/foo.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-struct Foo {
-  Foo();
-  Foo(int i);
-
-  void A();
-  void B(int i);
-  int C(int i);
-  int D(bool b) const;
-  static void E();
-  static int F(int i);
-};
-
-void Foo::A() {}
-void Foo::B(int i) {}
-int Foo::C(int i) { return i; }
-int Foo::D(bool b) const { return 1; }
-void Foo::E() {}
-int Foo::F(int i) { return i; }
diff --git a/lit/Reproducer/TestInstrumentationRecord.test b/lit/Reproducer/TestInstrumentationRecord.test
deleted file mode 100644
index 0e6202b..0000000
--- a/lit/Reproducer/TestInstrumentationRecord.test
+++ /dev/null
@@ -1,10 +0,0 @@
-# RUN: cp %p/Inputs/foo.cpp %t.cpp
-# RUN: lldb-instr %t.cpp
-# RUN: cat %t.cpp | FileCheck %s
-
-# CHECK: LLDB_RECORD_METHOD_NO_ARGS(void, Foo, A);
-# CHECK: LLDB_RECORD_METHOD(void, Foo, B, (int), i);
-# CHECK: LLDB_RECORD_METHOD(int, Foo, C, (int), i);
-# CHECK: LLDB_RECORD_METHOD_CONST(int, Foo, D, (bool), b);
-# CHECK: LLDB_RECORD_STATIC_METHOD_NO_ARGS(void, Foo, E);
-# CHECK: LLDB_RECORD_STATIC_METHOD(int, Foo, F, (int), i);
diff --git a/lit/tools/lldb-instr/Inputs/foo.cpp b/lit/tools/lldb-instr/Inputs/foo.cpp
new file mode 100644
index 0000000..7db0452
--- /dev/null
+++ b/lit/tools/lldb-instr/Inputs/foo.cpp
@@ -0,0 +1,9 @@
+#include "foo.h"
+
+Foo::Foo() {}
+void Foo::A() {}
+void Foo::B(int i) {}
+int Foo::C(int i) { return i; }
+int Foo::D(bool b) const { return 1; }
+void Foo::E() {}
+int Foo::F(int i) { return i; }
diff --git a/lit/tools/lldb-instr/Inputs/foo.h b/lit/tools/lldb-instr/Inputs/foo.h
new file mode 100644
index 0000000..63b6cab
--- /dev/null
+++ b/lit/tools/lldb-instr/Inputs/foo.h
@@ -0,0 +1,12 @@
+struct Foo {
+  Foo();
+  Foo(int i);
+
+  void A();
+  void B(int i);
+  int C(int i);
+  int D(bool b) const;
+  static void E();
+  static int F(int i);
+  int G() { return 0; }
+};
diff --git a/lit/tools/lldb-instr/TestInstrumentationRecord.test b/lit/tools/lldb-instr/TestInstrumentationRecord.test
new file mode 100644
index 0000000..6f940b6
--- /dev/null
+++ b/lit/tools/lldb-instr/TestInstrumentationRecord.test
@@ -0,0 +1,14 @@
+# RUN: mkdir -p %t.dir
+# RUN: cp %p/Inputs/foo.cpp %t.dir/foo.cpp
+# RUN: cp %p/Inputs/foo.h %t.dir/foo.h
+
+# RUN: lldb-instr %t.dir/foo.cpp
+# RUN: cat %t.dir/foo.cpp | FileCheck %s
+
+# CHECK: LLDB_RECORD_CONSTRUCTOR_NO_ARGS(Foo);
+# CHECK: LLDB_RECORD_METHOD_NO_ARGS(void, Foo, A);
+# CHECK: LLDB_RECORD_METHOD(void, Foo, B, (int), i);
+# CHECK: LLDB_RECORD_METHOD(int, Foo, C, (int), i);
+# CHECK: LLDB_RECORD_METHOD_CONST(int, Foo, D, (bool), b);
+# CHECK: LLDB_RECORD_STATIC_METHOD_NO_ARGS(void, Foo, E);
+# CHECK: LLDB_RECORD_STATIC_METHOD(int, Foo, F, (int), i);
diff --git a/lit/Reproducer/TestInstrumentationRegister.test b/lit/tools/lldb-instr/TestInstrumentationRegister.test
similarity index 67%
rename from lit/Reproducer/TestInstrumentationRegister.test
rename to lit/tools/lldb-instr/TestInstrumentationRegister.test
index a1d859b..300158c 100644
--- a/lit/Reproducer/TestInstrumentationRegister.test
+++ b/lit/tools/lldb-instr/TestInstrumentationRegister.test
@@ -1,5 +1,8 @@
-# RUN: cp %p/Inputs/foo.cpp %t.cpp
-# RUN: lldb-instr %t.cpp | FileCheck %s
+# RUN: mkdir -p %t.dir
+# RUN: cp %p/Inputs/foo.cpp %t.dir/foo.cpp
+# RUN: cp %p/Inputs/foo.h %t.dir/foo.h
+
+# RUN: lldb-instr %t.dir/foo.cpp | FileCheck %s
 
 # CHECK: LLDB_REGISTER_METHOD(void, Foo, A, ());
 # CHECK: LLDB_REGISTER_METHOD(void, Foo, B, (int));