mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-27 15:14:31 +00:00
[lldb/Reproducers] Make SBStream::Print an API instead of a SWIG extension
This makes it possible to instrument the call for the reproducers. This fixes TestStructuredDataAPI.py with reproducer replay. Differential revision: https://reviews.llvm.org/D80312
This commit is contained in:
1 parent
b8cbff51d3
commit
bfb2783726
3 files changed
+11
-8
No files matched your search
@@ -60,6 +60,12 @@ size_t SBStream::GetSize() {
|
||||
return static_cast<StreamString *>(m_opaque_up.get())->GetSize();
|
||||
}
|
||||
|
||||
void SBStream::Print(const char *str) {
|
||||
LLDB_RECORD_METHOD(void, SBStream, Print, (const char *), str);
|
||||
|
||||
Printf("%s", str);
|
||||
}
|
||||
|
||||
void SBStream::Printf(const char *format, ...) {
|
||||
if (!format)
|
||||
return;
|
||||
@@ -204,6 +210,7 @@ void RegisterMethods<SBStream>(Registry &R) {
|
||||
LLDB_REGISTER_METHOD(void, SBStream, RedirectToFileHandle, (FILE *, bool));
|
||||
LLDB_REGISTER_METHOD(void, SBStream, RedirectToFileDescriptor, (int, bool));
|
||||
LLDB_REGISTER_METHOD(void, SBStream, Clear, ());
|
||||
LLDB_REGISTER_METHOD(void, SBStream, Print, (const char *));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user