summaryrefslogtreecommitdiffstats
path: root/lldb/lit/tools/lldb-instr
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/lit/tools/lldb-instr')
-rw-r--r--lldb/lit/tools/lldb-instr/Inputs/foo.cpp8
-rw-r--r--lldb/lit/tools/lldb-instr/Inputs/foo.h2
-rw-r--r--lldb/lit/tools/lldb-instr/TestInstrumentationRecord.test2
-rw-r--r--lldb/lit/tools/lldb-instr/TestInstrumentationRegister.test3
4 files changed, 15 insertions, 0 deletions
diff --git a/lldb/lit/tools/lldb-instr/Inputs/foo.cpp b/lldb/lit/tools/lldb-instr/Inputs/foo.cpp
index 36a73236a42..981b911eee2 100644
--- a/lldb/lit/tools/lldb-instr/Inputs/foo.cpp
+++ b/lldb/lit/tools/lldb-instr/Inputs/foo.cpp
@@ -16,3 +16,11 @@ Foo Foo::H() { return Foo(); }
void Foo::I() const { MACRO_FOO; }
Bar Foo::J() const { return MACRO_BAR(Bar()); }
Bar Foo::K(void *v) const { return Bar(); }
+Bar &Foo::L() const {
+ Bar *b = new Bar();
+ return *b;
+};
+Bar *Foo::M() const {
+ Bar *b = new Bar();
+ return b;
+};
diff --git a/lldb/lit/tools/lldb-instr/Inputs/foo.h b/lldb/lit/tools/lldb-instr/Inputs/foo.h
index 9e2608e2b9e..fb76e046e02 100644
--- a/lldb/lit/tools/lldb-instr/Inputs/foo.h
+++ b/lldb/lit/tools/lldb-instr/Inputs/foo.h
@@ -14,4 +14,6 @@ struct Foo {
void I() const;
Bar J() const;
Bar K(void *v) const;
+ Bar &L() const;
+ Bar *M() const;
};
diff --git a/lldb/lit/tools/lldb-instr/TestInstrumentationRecord.test b/lldb/lit/tools/lldb-instr/TestInstrumentationRecord.test
index cd294140172..a75a3fcecff 100644
--- a/lldb/lit/tools/lldb-instr/TestInstrumentationRecord.test
+++ b/lldb/lit/tools/lldb-instr/TestInstrumentationRecord.test
@@ -20,3 +20,5 @@
# CHECK-NOT: LLDB_RECORD_RESULT(Bar());
# CHECK: LLDB_RECORD_DUMMY(Bar, Foo, K, (void *), v);
# CHECK-NOT: LLDB_RECORD_RESULT(Bar());
+# CHECK: LLDB_RECORD_RESULT(*b)
+# CHECK: LLDB_RECORD_RESULT(b)
diff --git a/lldb/lit/tools/lldb-instr/TestInstrumentationRegister.test b/lldb/lit/tools/lldb-instr/TestInstrumentationRegister.test
index 0b15944a9a7..aa8af5b8fe2 100644
--- a/lldb/lit/tools/lldb-instr/TestInstrumentationRegister.test
+++ b/lldb/lit/tools/lldb-instr/TestInstrumentationRegister.test
@@ -11,6 +11,9 @@
# CHECK: LLDB_REGISTER_METHOD_CONST(int, Foo, D, (bool));
# CHECK: LLDB_REGISTER_STATIC_METHOD(void, Foo, E, ());
# CHECK: LLDB_REGISTER_STATIC_METHOD(int, Foo, F, (int));
+# CHECK: LLDB_REGISTER_METHOD_CONST(Bar, Foo, J, ());
+# CHECK: LLDB_REGISTER_METHOD_CONST(Bar &, Foo, L, ());
+# CHECK: LLDB_REGISTER_METHOD_CONST(Bar *, Foo, M, ());
# CHECK-NOT: LLDB_REGISTER_STATIC_METHOD(void, Foo, G
# CHECK-NOT: LLDB_REGISTER_METHOD_CONST(void, Foo, I, ());
# CHECK-NOT: LLDB_REGISTER_METHOD_CONST(Bar, Foo, K, (void*));
OpenPOWER on IntegriCloud