[Lldb-commits] [PATCH] D48977: Fixed redefinition warnings with LLVM_ENABLE_MODULES
Raphael Isemann via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Jul 5 09:16:36 PDT 2018
teemperor created this revision.
teemperor added a reviewer: aprantl.
Herald added a subscriber: mgorny.
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 <module-includes>: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]
^
<command line>: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.
https://reviews.llvm.org/D48977
Files:
include/lldb/Host/Config.h.cmake
Index: include/lldb/Host/Config.h.cmake
===================================================================
--- include/lldb/Host/Config.h.cmake
+++ 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48977.154252.patch
Type: text/x-patch
Size: 356 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180705/7b2b5ef7/attachment.bin>
More information about the lldb-commits
mailing list