mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-21 04:25:45 -04:00

For some reason I had convinced myself that functions returning by pointer or reference do not require recording their result. However, after further considering I don't see how that could work, at least not with the current implementation. Interestingly enough, the reproducer instrumentation already (mostly) accounts for this, though the lldb-instr tool did not. This patch adds the missing macros and updates the lldb-instr tool. Differential revision: https://reviews.llvm.org/D60178 llvm-svn: 357639
27 lines
620 B
C++
27 lines
620 B
C++
#include "foo.h"
|
|
|
|
#define MACRO_FOO \
|
|
{ void; }
|
|
#define MACRO_BAR(B) B
|
|
|
|
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; }
|
|
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()); }
|
|
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;
|
|
};
|