diff options
author | Med Ismail Bennani <medismail.bennani@gmail.com> | 2022-02-10 16:12:59 -0800 |
---|---|---|
committer | Med Ismail Bennani <medismail.bennani@gmail.com> | 2022-02-16 11:44:07 -0800 |
commit | 7f3fc2eee8ff13f6922a16331870fc57cd022773 (patch) | |
tree | 9ac3b9752d26aac4eb3c6827bd83c45b65603d24 /lldb/source/Interpreter/CommandInterpreter.cpp | |
parent | 70665844915eeb66273a84f131ffc33a202539d5 (diff) | |
download | llvm-7f3fc2eee8ff13f6922a16331870fc57cd022773.zip llvm-7f3fc2eee8ff13f6922a16331870fc57cd022773.tar.gz llvm-7f3fc2eee8ff13f6922a16331870fc57cd022773.tar.bz2 |
[lldb/API] Add a way to check if the CommandInterpreter is interactive
This patch adds the ability for the user to check if the command
interpreter's IOHandler is interactive.
Differential Revision: https://reviews.llvm.org/D119499
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r-- | lldb/source/Interpreter/CommandInterpreter.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index 087e8b4..622f36e 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -3162,6 +3162,10 @@ bool CommandInterpreter::SaveTranscript( return true; } +bool CommandInterpreter::IsInteractive() { + return (GetIOHandler() ? GetIOHandler()->GetIsInteractive() : false); +} + FileSpec CommandInterpreter::GetCurrentSourceDir() { if (m_command_source_dirs.empty()) return {}; |