This is an archive of the discontinued LLVM Phabricator instance.

Fixed redefinition warnings with LLVM_ENABLE_MODULES
ClosedPublic

Authored by teemperor on Jul 5 2018, 9:16 AM.

Details

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 <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.

Diff Detail

Repository
rL LLVM

Event Timeline

teemperor created this revision.Jul 5 2018, 9:16 AM
aprantl accepted this revision.Jul 5 2018, 9:38 AM

That looks like a safe change to make.

This revision is now accepted and ready to land.Jul 5 2018, 9:38 AM
This revision was automatically updated to reflect the committed changes.