[Lldb-commits] [lldb] r357496 - [lldb-server] Use llgs namespace to avoid conflicts with Win32 API
Aaron Smith via lldb-commits
lldb-commits at lists.llvm.org
Tue Apr 2 10:10:13 PDT 2019
Author: asmith
Date: Tue Apr 2 10:10:12 2019
New Revision: 357496
URL: http://llvm.org/viewvc/llvm-project?rev=357496&view=rev
Log:
[lldb-server] Use llgs namespace to avoid conflicts with Win32 API
Modified:
lldb/trunk/tools/lldb-server/lldb-server.cpp
Modified: lldb/trunk/tools/lldb-server/lldb-server.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-server/lldb-server.cpp?rev=357496&r1=357495&r2=357496&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-server/lldb-server.cpp (original)
+++ lldb/trunk/tools/lldb-server/lldb-server.cpp Tue Apr 2 10:10:12 2019
@@ -36,6 +36,7 @@ static void display_usage(const char *pr
int main_gdbserver(int argc, char *argv[]);
int main_platform(int argc, char *argv[]);
+namespace llgs {
static void initialize() {
if (auto e = g_debugger_lifetime->Initialize(
llvm::make_unique<SystemInitializerLLGS>(), nullptr))
@@ -43,6 +44,7 @@ static void initialize() {
}
static void terminate() { g_debugger_lifetime->Terminate(); }
+} // namespace llgs
//----------------------------------------------------------------------
// main
@@ -61,14 +63,14 @@ int main(int argc, char *argv[]) {
switch (argv[1][0]) {
case 'g':
- initialize();
+ llgs::initialize();
main_gdbserver(argc, argv);
- terminate();
+ llgs::terminate();
break;
case 'p':
- initialize();
+ llgs::initialize();
main_platform(argc, argv);
- terminate();
+ llgs::terminate();
break;
case 'v':
fprintf(stderr, "%s\n", lldb_private::GetVersion());
More information about the lldb-commits
mailing list