forked from OSchip/llvm-project
[lldb/Reproducers] Add underscore to varaibles in LLDB_RECORD macros
Rename all variables used in the LLDB_RECORD macros to start with an underscore to avoid conflicts with the arguments being recorded.
This commit is contained in:
parent
7ac9443002
commit
ddf814688b
|
@ -91,100 +91,99 @@ template <typename... Ts> inline std::string stringify_args(const Ts &... ts) {
|
||||||
#Method, #Signature)
|
#Method, #Signature)
|
||||||
|
|
||||||
#define LLDB_RECORD_CONSTRUCTOR(Class, Signature, ...) \
|
#define LLDB_RECORD_CONSTRUCTOR(Class, Signature, ...) \
|
||||||
lldb_private::repro::Recorder sb_recorder(LLVM_PRETTY_FUNCTION, \
|
lldb_private::repro::Recorder _recorder(LLVM_PRETTY_FUNCTION, \
|
||||||
stringify_args(__VA_ARGS__)); \
|
stringify_args(__VA_ARGS__)); \
|
||||||
if (lldb_private::repro::InstrumentationData data = \
|
if (lldb_private::repro::InstrumentationData _data = \
|
||||||
LLDB_GET_INSTRUMENTATION_DATA()) { \
|
LLDB_GET_INSTRUMENTATION_DATA()) { \
|
||||||
sb_recorder.Record(data.GetSerializer(), data.GetRegistry(), \
|
_recorder.Record(_data.GetSerializer(), _data.GetRegistry(), \
|
||||||
&lldb_private::repro::construct<Class Signature>::doit, \
|
&lldb_private::repro::construct<Class Signature>::doit, \
|
||||||
__VA_ARGS__); \
|
__VA_ARGS__); \
|
||||||
sb_recorder.RecordResult(this, false); \
|
_recorder.RecordResult(this, false); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LLDB_RECORD_CONSTRUCTOR_NO_ARGS(Class) \
|
#define LLDB_RECORD_CONSTRUCTOR_NO_ARGS(Class) \
|
||||||
lldb_private::repro::Recorder sb_recorder(LLVM_PRETTY_FUNCTION); \
|
lldb_private::repro::Recorder _recorder(LLVM_PRETTY_FUNCTION); \
|
||||||
if (lldb_private::repro::InstrumentationData data = \
|
if (lldb_private::repro::InstrumentationData _data = \
|
||||||
LLDB_GET_INSTRUMENTATION_DATA()) { \
|
LLDB_GET_INSTRUMENTATION_DATA()) { \
|
||||||
sb_recorder.Record(data.GetSerializer(), data.GetRegistry(), \
|
_recorder.Record(_data.GetSerializer(), _data.GetRegistry(), \
|
||||||
&lldb_private::repro::construct<Class()>::doit); \
|
&lldb_private::repro::construct<Class()>::doit); \
|
||||||
sb_recorder.RecordResult(this, false); \
|
_recorder.RecordResult(this, false); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LLDB_RECORD_METHOD(Result, Class, Method, Signature, ...) \
|
#define LLDB_RECORD_METHOD(Result, Class, Method, Signature, ...) \
|
||||||
lldb_private::repro::Recorder sb_recorder( \
|
lldb_private::repro::Recorder _recorder(LLVM_PRETTY_FUNCTION, \
|
||||||
LLVM_PRETTY_FUNCTION, stringify_args(*this, __VA_ARGS__)); \
|
stringify_args(*this, __VA_ARGS__)); \
|
||||||
if (lldb_private::repro::InstrumentationData data = \
|
if (lldb_private::repro::InstrumentationData _data = \
|
||||||
LLDB_GET_INSTRUMENTATION_DATA()) { \
|
LLDB_GET_INSTRUMENTATION_DATA()) { \
|
||||||
sb_recorder.Record( \
|
_recorder.Record(_data.GetSerializer(), _data.GetRegistry(), \
|
||||||
data.GetSerializer(), data.GetRegistry(), \
|
&lldb_private::repro::invoke<Result( \
|
||||||
&lldb_private::repro::invoke<Result(Class::*) Signature>::method<( \
|
Class::*) Signature>::method<(&Class::Method)>::doit, \
|
||||||
&Class::Method)>::doit, \
|
this, __VA_ARGS__); \
|
||||||
this, __VA_ARGS__); \
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LLDB_RECORD_METHOD_CONST(Result, Class, Method, Signature, ...) \
|
#define LLDB_RECORD_METHOD_CONST(Result, Class, Method, Signature, ...) \
|
||||||
lldb_private::repro::Recorder sb_recorder( \
|
lldb_private::repro::Recorder _recorder(LLVM_PRETTY_FUNCTION, \
|
||||||
LLVM_PRETTY_FUNCTION, stringify_args(*this, __VA_ARGS__)); \
|
stringify_args(*this, __VA_ARGS__)); \
|
||||||
if (lldb_private::repro::InstrumentationData data = \
|
if (lldb_private::repro::InstrumentationData _data = \
|
||||||
LLDB_GET_INSTRUMENTATION_DATA()) { \
|
LLDB_GET_INSTRUMENTATION_DATA()) { \
|
||||||
sb_recorder.Record( \
|
_recorder.Record( \
|
||||||
data.GetSerializer(), data.GetRegistry(), \
|
_data.GetSerializer(), _data.GetRegistry(), \
|
||||||
&lldb_private::repro::invoke<Result( \
|
&lldb_private::repro::invoke<Result( \
|
||||||
Class::*) Signature const>::method_const<(&Class::Method)>::doit, \
|
Class::*) Signature const>::method_const<(&Class::Method)>::doit, \
|
||||||
this, __VA_ARGS__); \
|
this, __VA_ARGS__); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LLDB_RECORD_METHOD_NO_ARGS(Result, Class, Method) \
|
#define LLDB_RECORD_METHOD_NO_ARGS(Result, Class, Method) \
|
||||||
lldb_private::repro::Recorder sb_recorder(LLVM_PRETTY_FUNCTION, \
|
lldb_private::repro::Recorder _recorder(LLVM_PRETTY_FUNCTION, \
|
||||||
stringify_args(*this)); \
|
stringify_args(*this)); \
|
||||||
if (lldb_private::repro::InstrumentationData data = \
|
if (lldb_private::repro::InstrumentationData _data = \
|
||||||
LLDB_GET_INSTRUMENTATION_DATA()) { \
|
LLDB_GET_INSTRUMENTATION_DATA()) { \
|
||||||
sb_recorder.Record(data.GetSerializer(), data.GetRegistry(), \
|
_recorder.Record(_data.GetSerializer(), _data.GetRegistry(), \
|
||||||
&lldb_private::repro::invoke<Result ( \
|
&lldb_private::repro::invoke<Result ( \
|
||||||
Class::*)()>::method<(&Class::Method)>::doit, \
|
Class::*)()>::method<(&Class::Method)>::doit, \
|
||||||
this); \
|
this); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LLDB_RECORD_METHOD_CONST_NO_ARGS(Result, Class, Method) \
|
#define LLDB_RECORD_METHOD_CONST_NO_ARGS(Result, Class, Method) \
|
||||||
lldb_private::repro::Recorder sb_recorder(LLVM_PRETTY_FUNCTION, \
|
lldb_private::repro::Recorder _recorder(LLVM_PRETTY_FUNCTION, \
|
||||||
stringify_args(*this)); \
|
stringify_args(*this)); \
|
||||||
if (lldb_private::repro::InstrumentationData data = \
|
if (lldb_private::repro::InstrumentationData _data = \
|
||||||
LLDB_GET_INSTRUMENTATION_DATA()) { \
|
LLDB_GET_INSTRUMENTATION_DATA()) { \
|
||||||
sb_recorder.Record( \
|
_recorder.Record( \
|
||||||
data.GetSerializer(), data.GetRegistry(), \
|
_data.GetSerializer(), _data.GetRegistry(), \
|
||||||
&lldb_private::repro::invoke<Result ( \
|
&lldb_private::repro::invoke<Result ( \
|
||||||
Class::*)() const>::method_const<(&Class::Method)>::doit, \
|
Class::*)() const>::method_const<(&Class::Method)>::doit, \
|
||||||
this); \
|
this); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LLDB_RECORD_STATIC_METHOD(Result, Class, Method, Signature, ...) \
|
#define LLDB_RECORD_STATIC_METHOD(Result, Class, Method, Signature, ...) \
|
||||||
lldb_private::repro::Recorder sb_recorder(LLVM_PRETTY_FUNCTION, \
|
lldb_private::repro::Recorder _recorder(LLVM_PRETTY_FUNCTION, \
|
||||||
stringify_args(__VA_ARGS__)); \
|
stringify_args(__VA_ARGS__)); \
|
||||||
if (lldb_private::repro::InstrumentationData data = \
|
if (lldb_private::repro::InstrumentationData _data = \
|
||||||
LLDB_GET_INSTRUMENTATION_DATA()) { \
|
LLDB_GET_INSTRUMENTATION_DATA()) { \
|
||||||
sb_recorder.Record(data.GetSerializer(), data.GetRegistry(), \
|
_recorder.Record(_data.GetSerializer(), _data.GetRegistry(), \
|
||||||
static_cast<Result(*) Signature>(&Class::Method), \
|
static_cast<Result(*) Signature>(&Class::Method), \
|
||||||
__VA_ARGS__); \
|
__VA_ARGS__); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LLDB_RECORD_STATIC_METHOD_NO_ARGS(Result, Class, Method) \
|
#define LLDB_RECORD_STATIC_METHOD_NO_ARGS(Result, Class, Method) \
|
||||||
lldb_private::repro::Recorder sb_recorder(LLVM_PRETTY_FUNCTION); \
|
lldb_private::repro::Recorder _recorder(LLVM_PRETTY_FUNCTION); \
|
||||||
if (lldb_private::repro::InstrumentationData data = \
|
if (lldb_private::repro::InstrumentationData _data = \
|
||||||
LLDB_GET_INSTRUMENTATION_DATA()) { \
|
LLDB_GET_INSTRUMENTATION_DATA()) { \
|
||||||
sb_recorder.Record(data.GetSerializer(), data.GetRegistry(), \
|
_recorder.Record(_data.GetSerializer(), _data.GetRegistry(), \
|
||||||
static_cast<Result (*)()>(&Class::Method)); \
|
static_cast<Result (*)()>(&Class::Method)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LLDB_RECORD_RESULT(Result) sb_recorder.RecordResult(Result, true);
|
#define LLDB_RECORD_RESULT(Result) _recorder.RecordResult(Result, true);
|
||||||
|
|
||||||
/// The LLDB_RECORD_DUMMY macro is special because it doesn't actually record
|
/// The LLDB_RECORD_DUMMY macro is special because it doesn't actually record
|
||||||
/// anything. It's used to track API boundaries when we cannot record for
|
/// anything. It's used to track API boundaries when we cannot record for
|
||||||
/// technical reasons.
|
/// technical reasons.
|
||||||
#define LLDB_RECORD_DUMMY(Result, Class, Method, Signature, ...) \
|
#define LLDB_RECORD_DUMMY(Result, Class, Method, Signature, ...) \
|
||||||
lldb_private::repro::Recorder sb_recorder(LLVM_PRETTY_FUNCTION, \
|
lldb_private::repro::Recorder _recorder(LLVM_PRETTY_FUNCTION, \
|
||||||
stringify_args(__VA_ARGS__));
|
stringify_args(__VA_ARGS__));
|
||||||
#define LLDB_RECORD_DUMMY_NO_ARGS(Result, Class, Method) \
|
#define LLDB_RECORD_DUMMY_NO_ARGS(Result, Class, Method) \
|
||||||
lldb_private::repro::Recorder sb_recorder(LLVM_PRETTY_FUNCTION);
|
lldb_private::repro::Recorder _recorder(LLVM_PRETTY_FUNCTION);
|
||||||
|
|
||||||
namespace lldb_private {
|
namespace lldb_private {
|
||||||
namespace repro {
|
namespace repro {
|
||||||
|
@ -699,7 +698,6 @@ public:
|
||||||
serializer.SerializeAll(0);
|
serializer.SerializeAll(0);
|
||||||
m_result_recorded = true;
|
m_result_recorded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Records a single function call.
|
/// Records a single function call.
|
||||||
|
@ -722,7 +720,6 @@ public:
|
||||||
// Record result.
|
// Record result.
|
||||||
serializer.SerializeAll(0);
|
serializer.SerializeAll(0);
|
||||||
m_result_recorded = true;
|
m_result_recorded = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Record the result of a function call.
|
/// Record the result of a function call.
|
||||||
|
|
Loading…
Reference in New Issue