From 22f5b9f124d2a606d27bfa8d5b3049e88dc3df21 Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Thu, 5 Jul 2018 17:12:11 +0000 Subject: [PATCH] Fixed redefinition warnings with LLVM_ENABLE_MODULES Summary: It seems we both have the HAVE_LIBCOMPRESSION define in the config header and in the source files definitions of some files. This causes that the Config.h header emits the following warning when we compile the Host module: ``` In file included from :21: In file included from /Users/teemperor/llvm/llvm/tools/lldb/include/lldb/Host/MainLoop.h:13: tools/lldb/include/lldb/Host/Config.h:33:9: warning: 'HAVE_LIBCOMPRESSION' macro redefined [-Wmacro-redefined] ^ :1:9: note: previous definition is here ^ ``` It's not really clear why the define is in both places (the commit message just says it fixes some unspecified bug), but we can easily work around this by just guarding our define in Config.h. Reviewers: aprantl Reviewed By: aprantl Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D48977 llvm-svn: 336377 --- lldb/include/lldb/Host/Config.h.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lldb/include/lldb/Host/Config.h.cmake b/lldb/include/lldb/Host/Config.h.cmake index d657557..02a57ad 100644 --- a/lldb/include/lldb/Host/Config.h.cmake +++ b/lldb/include/lldb/Host/Config.h.cmake @@ -30,6 +30,8 @@ #cmakedefine01 HAVE_NR_PROCESS_VM_READV +#ifndef HAVE_LIBCOMPRESSION #cmakedefine HAVE_LIBCOMPRESSION +#endif #endif // #ifndef LLDB_HOST_CONFIG_H -- 2.7.4