[Lldb-commits] [lldb] r374825 - build fix for SBInstruction.

Lawrence D'Anna via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 14 14:51:02 PDT 2019


Author: lawrence_danna
Date: Mon Oct 14 14:51:02 2019
New Revision: 374825

URL: http://llvm.org/viewvc/llvm-project?rev=374825&view=rev
Log:
build fix for SBInstruction.

oops!  I cherry-picked  rL374820 thinking it was completely
independent of D68737, but it wasn't.  It makes an incidental
use of SBFile::GetFile, which is introduced there, so I broke the
build.

The docs say you can commit without review for "obvious".   I think
this qualifies.   If this kind of fix isn't considered obvious, let
me know and I'll revert instead.

Fixes: rL374820

Modified:
    lldb/trunk/include/lldb/API/SBFile.h
    lldb/trunk/source/API/SBInstruction.cpp
    lldb/trunk/source/API/SBInstructionList.cpp

Modified: lldb/trunk/include/lldb/API/SBFile.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBFile.h?rev=374825&r1=374824&r2=374825&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBFile.h (original)
+++ lldb/trunk/include/lldb/API/SBFile.h Mon Oct 14 14:51:02 2019
@@ -14,6 +14,8 @@
 namespace lldb {
 
 class LLDB_API SBFile {
+  friend class SBInstruction;
+  friend class SBInstructionList;
   friend class SBDebugger;
   friend class SBCommandReturnObject;
   friend class SBProcess;

Modified: lldb/trunk/source/API/SBInstruction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBInstruction.cpp?rev=374825&r1=374824&r2=374825&view=diff
==============================================================================
--- lldb/trunk/source/API/SBInstruction.cpp (original)
+++ lldb/trunk/source/API/SBInstruction.cpp Mon Oct 14 14:51:02 2019
@@ -264,7 +264,7 @@ void SBInstruction::Print(FILE *outp) {
 
 void SBInstruction::Print(SBFile out) {
   LLDB_RECORD_METHOD(void, SBInstruction, Print, (SBFile), out);
-  Print(out.GetFile());
+  Print(out.m_opaque_sp);
 }
 
 void SBInstruction::Print(FileSP out_sp) {

Modified: lldb/trunk/source/API/SBInstructionList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBInstructionList.cpp?rev=374825&r1=374824&r2=374825&view=diff
==============================================================================
--- lldb/trunk/source/API/SBInstructionList.cpp (original)
+++ lldb/trunk/source/API/SBInstructionList.cpp Mon Oct 14 14:51:02 2019
@@ -130,7 +130,7 @@ void SBInstructionList::Print(SBFile out
   LLDB_RECORD_METHOD(void, SBInstructionList, Print, (SBFile), out);
   if (!out.IsValid())
     return;
-  StreamFile stream(out.GetFile());
+  StreamFile stream(out.m_opaque_sp);
   GetDescription(stream);
 }
 




More information about the lldb-commits mailing list