projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e84c3b2
)
[lldb] Destory the debugger in the Driver dtor (NFC)
author
Jonas Devlieghere
<jonas@devlieghere.com>
Tue, 10 Nov 2020 00:36:03 +0000
(16:36 -0800)
committer
Jonas Devlieghere
<jonas@devlieghere.com>
Tue, 10 Nov 2020 00:47:30 +0000
(16:47 -0800)
lldb/tools/driver/Driver.cpp
patch
|
blob
|
history
diff --git
a/lldb/tools/driver/Driver.cpp
b/lldb/tools/driver/Driver.cpp
index
e6b725d
..
526afdc
100644
(file)
--- a/
lldb/tools/driver/Driver.cpp
+++ b/
lldb/tools/driver/Driver.cpp
@@
-112,7
+112,10
@@
Driver::Driver()
g_driver = this;
}
-Driver::~Driver() { g_driver = nullptr; }
+Driver::~Driver() {
+ SBDebugger::Destroy(m_debugger);
+ g_driver = nullptr;
+}
void Driver::OptionData::AddInitialCommand(std::string command,
CommandPlacement placement,
@@
-676,9
+679,7
@@
int Driver::MainLoop() {
reset_stdin_termios();
fclose(stdin);
- int exit_code = sb_interpreter.GetQuitStatus();
- SBDebugger::Destroy(m_debugger);
- return exit_code;
+ return sb_interpreter.GetQuitStatus();
}
void Driver::ResizeWindow(unsigned short col) {