diff options
author | Pavel Labath <pavel@labath.sk> | 2025-04-22 10:14:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-22 10:14:03 +0200 |
commit | a22ad659cd0665669d89fae174f9e6a83d1a446d (patch) | |
tree | c08025b7137e3b7d89e5c24ae40869a6945043f9 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | |
parent | 8bc0d4d1ccb708d20413876258885a48d3ca6b3d (diff) | |
download | llvm-a22ad659cd0665669d89fae174f9e6a83d1a446d.zip llvm-a22ad659cd0665669d89fae174f9e6a83d1a446d.tar.gz llvm-a22ad659cd0665669d89fae174f9e6a83d1a446d.tar.bz2 |
[lldb/cmake] Normalize use of HAVE_LIBCOMPRESSION (#135528)
I *think* this was the reason behind the failures in
2fd860c1f559c0b0be66cc000e38270a04d0a1a3: the clang include tool showed
the Config.h headers as unused, and because the macro was referenced
through an `#ifdef`, its removal didn't cause build failures. Switching
to `#cmakedefine01` + `#if` should make sure this does not happen again.
According to D48977, the `#ifndef`+`#cmakedefine` patterns is due to
some files redefining the macro themselves. I no longer see any such
files in the source tree (there also were no files like that in the
source tree at the revision mentioned, but the macro *was* defined in
the hand-maintained XCode project we had at the time).
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp index abdc3da..7fe5dd4 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp @@ -41,7 +41,7 @@ #define DEBUGSERVER_BASENAME "lldb-server" #endif -#if defined(HAVE_LIBCOMPRESSION) +#if HAVE_LIBCOMPRESSION #include <compression.h> #endif @@ -72,7 +72,7 @@ GDBRemoteCommunication::~GDBRemoteCommunication() { Disconnect(); } -#if defined(HAVE_LIBCOMPRESSION) +#if HAVE_LIBCOMPRESSION if (m_decompression_scratch) free (m_decompression_scratch); #endif @@ -509,7 +509,7 @@ bool GDBRemoteCommunication::DecompressPacket() { } } -#if defined(HAVE_LIBCOMPRESSION) +#if HAVE_LIBCOMPRESSION if (m_compression_type == CompressionType::ZlibDeflate || m_compression_type == CompressionType::LZFSE || m_compression_type == CompressionType::LZ4 || |