This is an archive of the discontinued LLVM Phabricator instance.

Fix modules build of AVRAsmParser.cpp
ClosedPublic

Authored by arichardson on Oct 19 2018, 2:33 AM.

Details

Summary

Without this change I get the following error:

lib/Target/AVR/AVRGenAsmMatcher.inc:1135:1: error: redundant #include of module 'LLVM_Utils.Support.Format' appears within namespace 'llvm' [-Wmodules-import-nested-redundant]

Diff Detail

Event Timeline

arichardson created this revision.Oct 19 2018, 2:33 AM
dylanmckay accepted this revision.Nov 1 2018, 10:09 PM

Hey @arichardson, sorry for the delay, exam period!

This looks great. I remember building the LLVM tree recently, but I don't remember hitting this. I am unsure if I that was slightly before or slightly after you posted this patch on the 19th though.

The llvm-avr-linux buildbot running clang didn't seem to hit this either. Perhaps it's a GCC thing?

Regardless, AVRAsmParser is a private implementation detail of createAVRAsmParser and so moving it into an anonymous namespace makes sense.

Thanks for the patch @arichardson

This revision is now accepted and ready to land.Nov 1 2018, 10:09 PM
This revision was automatically updated to reflect the committed changes.