This is an archive of the discontinued LLVM Phabricator instance.

Cleanup include: TableGen
ClosedPublic

Authored by serge-sans-paille on Mar 9 2022, 1:37 PM.

Details

Summary

This also includes a few cleanup from Support.
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptMar 9 2022, 1:37 PM
serge-sans-paille requested review of this revision.Mar 9 2022, 1:37 PM
MaskRay accepted this revision.Mar 9 2022, 1:45 PM

Thanks!

This revision is now accepted and ready to land.Mar 9 2022, 1:45 PM

Fix Windows build

This revision was automatically updated to reflect the committed changes.

Hello,

This broke compiling with
-DLLVM_ENABLE_Z3_SOLVER=ON

12:39:06 ../lib/Support/Z3Solver.cpp:42:28: error: 'llvm::Twine' is an incomplete type
12:39:06 llvm::Twine(Z3_get_error_msg(Context, Error)));
12:39:06 ^
12:39:06 ../include/llvm/Support/ErrorHandling.h:21:9: note: forward declaration of 'llvm::Twine'
12:39:06 class Twine;
12:39:06 ^

etc

Hello,

This broke compiling with
-DLLVM_ENABLE_Z3_SOLVER=ON

12:39:06 ../lib/Support/Z3Solver.cpp:42:28: error: 'llvm::Twine' is an incomplete type
12:39:06 llvm::Twine(Z3_get_error_msg(Context, Error)));
12:39:06 ^
12:39:06 ../include/llvm/Support/ErrorHandling.h:21:9: note: forward declaration of 'llvm::Twine'
12:39:06 class Twine;
12:39:06 ^

etc

Thanks for reporting the error. Should be fixed on main now.

Hello,

This broke compiling with
-DLLVM_ENABLE_Z3_SOLVER=ON

12:39:06 ../lib/Support/Z3Solver.cpp:42:28: error: 'llvm::Twine' is an incomplete type
12:39:06 llvm::Twine(Z3_get_error_msg(Context, Error)));
12:39:06 ^
12:39:06 ../include/llvm/Support/ErrorHandling.h:21:9: note: forward declaration of 'llvm::Twine'
12:39:06 class Twine;
12:39:06 ^

etc

Thanks for reporting the error. Should be fixed on main now.

Yep, thanks!

Hello, there is a usage of the needConversion function in MemoryBuffer.cpp which requires the following header #include "llvm/Support/AutoConvert.h" for z/OS. Can this header be added back to MemoryBuffer.cpp? I think it's usage was missed because it is guarded for z/OS only.

Thanks for the quick fix! There is another place where a similar situation happened. This header #include "llvm/Support/BCD.h" is being used in llvm/lib/Support/Host.cpp as well.