[lldb/API] Add missing reproducer instrumentation to GetHostPlatform.
authorJonas Devlieghere <jonas@devlieghere.com>
Tue, 31 Mar 2020 17:43:22 +0000 (10:43 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Tue, 31 Mar 2020 17:45:25 +0000 (10:45 -0700)
SBPlatform::GetHostPlatform was missing the reproducer instrumentation
macros. Fixed by running lldb-instr on SBPlatform.cpp:

$ ./bin/lldb-instr ../llvm-project/lldb/source/API/SBPlatform.cpp

lldb/source/API/SBPlatform.cpp

index ddb77f4..7ac8524 100644 (file)
@@ -306,9 +306,12 @@ SBPlatform &SBPlatform::operator=(const SBPlatform &rhs) {
 SBPlatform::~SBPlatform() = default;
 
 SBPlatform SBPlatform::GetHostPlatform() {
+  LLDB_RECORD_STATIC_METHOD_NO_ARGS(lldb::SBPlatform, SBPlatform,
+                                    GetHostPlatform);
+
   SBPlatform host_platform;
   host_platform.m_opaque_sp = Platform::GetHostPlatform();
-  return host_platform;
+  return LLDB_RECORD_RESULT(host_platform);
 }
 
 bool SBPlatform::IsValid() const {
@@ -756,6 +759,8 @@ void RegisterMethods<SBPlatform>(Registry &R) {
   LLDB_REGISTER_METHOD(lldb::SBEnvironment, SBPlatform, GetEnvironment, ());
   LLDB_REGISTER_METHOD_CONST(lldb::SBUnixSignals, SBPlatform, GetUnixSignals,
                              ());
+  LLDB_REGISTER_STATIC_METHOD(lldb::SBPlatform, SBPlatform, GetHostPlatform,
+                              ());
 }
 
 }