From 9efbc564baab71e3260d211041a9df8acf8a8764 Mon Sep 17 00:00:00 2001 From: Lawrence D'Anna Date: Mon, 14 Oct 2019 21:51:02 +0000 Subject: [PATCH] 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 llvm-svn: 374825 --- lldb/include/lldb/API/SBFile.h | 2 ++ lldb/source/API/SBInstruction.cpp | 2 +- lldb/source/API/SBInstructionList.cpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lldb/include/lldb/API/SBFile.h b/lldb/include/lldb/API/SBFile.h index 747e2eaad13f..0dbf91439b4c 100644 --- a/lldb/include/lldb/API/SBFile.h +++ b/lldb/include/lldb/API/SBFile.h @@ -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; diff --git a/lldb/source/API/SBInstruction.cpp b/lldb/source/API/SBInstruction.cpp index 311402877f61..a9ef9fb59d24 100644 --- a/lldb/source/API/SBInstruction.cpp +++ b/lldb/source/API/SBInstruction.cpp @@ -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) { diff --git a/lldb/source/API/SBInstructionList.cpp b/lldb/source/API/SBInstructionList.cpp index 403ccaf75e95..8b3855c0883b 100644 --- a/lldb/source/API/SBInstructionList.cpp +++ b/lldb/source/API/SBInstructionList.cpp @@ -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); }