HomePhabricator

Refactor HAVE_LIBCOMPRESSION and related code in GDBRemoteCommunication

Description

Refactor HAVE_LIBCOMPRESSION and related code in GDBRemoteCommunication

Summary:
The field m_decompression_scratch_type is only used when HAVE_LIBCOMPRESSION is
defined, which caused a warning which I fixed in rLLDB350675 by just marking the variable as always used.

This patch fixes this in a better way by only defining the variable (and the related m_decompression_scratch
variable) when HAVE_LIBCOMPRESSION is defined. This also required changing the way we handle
HAVE_LIBCOMPRESSION works, as this was previously always defined on macOS within the source file
but not in the header. Now it's always defined from within our config header when CMake defines it or when
we are on macOS.

The field initialization was moved to the header to prevent that we have #ifdef within our initializer list.

Reviewers: #lldb, jasonmolenda, sgraenitz, labath

Reviewed By: labath

Subscribers: labath, beanz, mgorny, lldb-commits, dblaikie

Differential Revision: https://reviews.llvm.org/D57011

Details

Committed
teemperorJan 25 2019, 12:21 AM
Reviewer
labath
Differential Revision
D57011: Refactor HAVE_LIBCOMPRESSION and related code in GDBRemoteCommunication
Branches
Unknown
Tags
Unknown