[Lldb-commits] [lldb] r354303 - [lldb-instr] Test that we ignore existing macros.
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Mon Feb 18 17:20:49 PST 2019
Author: jdevlieghere
Date: Mon Feb 18 17:20:49 2019
New Revision: 354303
URL: http://llvm.org/viewvc/llvm-project?rev=354303&view=rev
Log:
[lldb-instr] Test that we ignore existing macros.
Although the functionality was already present, it wasn't tested.
Modified:
lldb/trunk/lit/tools/lldb-instr/Inputs/foo.cpp
lldb/trunk/lit/tools/lldb-instr/Inputs/foo.h
lldb/trunk/lit/tools/lldb-instr/TestInstrumentationRecord.test
Modified: lldb/trunk/lit/tools/lldb-instr/Inputs/foo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/tools/lldb-instr/Inputs/foo.cpp?rev=354303&r1=354302&r2=354303&view=diff
==============================================================================
--- lldb/trunk/lit/tools/lldb-instr/Inputs/foo.cpp (original)
+++ lldb/trunk/lit/tools/lldb-instr/Inputs/foo.cpp Mon Feb 18 17:20:49 2019
@@ -1,5 +1,9 @@
#include "foo.h"
+#define MACRO_FOO \
+ { void; }
+#define MACRO_BAR(B) B
+
Foo::Foo() {}
void Foo::A() {}
void Foo::B(int i) {}
@@ -9,3 +13,5 @@ void Foo::E() {}
int Foo::F(int i) { return i; }
void Foo::G(const char *fmt...) {}
Foo Foo::H() { return Foo(); }
+void Foo::I() const { MACRO_FOO; }
+Bar Foo::J() const { return MACRO_BAR(Bar()); }
Modified: lldb/trunk/lit/tools/lldb-instr/Inputs/foo.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/tools/lldb-instr/Inputs/foo.h?rev=354303&r1=354302&r2=354303&view=diff
==============================================================================
--- lldb/trunk/lit/tools/lldb-instr/Inputs/foo.h (original)
+++ lldb/trunk/lit/tools/lldb-instr/Inputs/foo.h Mon Feb 18 17:20:49 2019
@@ -1,3 +1,4 @@
+struct Bar {};
struct Foo {
Foo();
Foo(int i);
@@ -8,6 +9,8 @@ struct Foo {
int D(bool b) const;
static void E();
static int F(int i);
- void G(const char* fmt...);
+ void G(const char *fmt...);
static Foo H();
+ void I() const;
+ Bar J() const;
};
Modified: lldb/trunk/lit/tools/lldb-instr/TestInstrumentationRecord.test
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/tools/lldb-instr/TestInstrumentationRecord.test?rev=354303&r1=354302&r2=354303&view=diff
==============================================================================
--- lldb/trunk/lit/tools/lldb-instr/TestInstrumentationRecord.test (original)
+++ lldb/trunk/lit/tools/lldb-instr/TestInstrumentationRecord.test Mon Feb 18 17:20:49 2019
@@ -15,3 +15,6 @@
# CHECK-NOT: LLDB_RECORD_STATIC_METHOD(void, Foo, G
# CHECK: LLDB_RECORD_STATIC_METHOD_NO_ARGS(Foo, Foo, H);
# CHECK: LLDB_RECORD_RESULT(Foo())
+# CHECK-NOT: LLDB_RECORD_METHOD_CONST_NO_ARGS(void, Foo, I);
+# CHECK: LLDB_RECORD_METHOD_CONST_NO_ARGS(Bar, Foo, J);
+# CHECK-NOT: LLDB_RECORD_RESULT(Bar());
More information about the lldb-commits
mailing list