This is an archive of the discontinued LLVM Phabricator instance.

Cleanup includes: LLVMAnalysis
ClosedPublic

Authored by serge-sans-paille on Feb 28 2022, 5:13 AM.

Details

Summary

Number of lines output by preprocessor:
before: 1065940348
after: 1065307662

Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup

Diff Detail

Event Timeline

serge-sans-paille requested review of this revision.Feb 28 2022, 5:14 AM
Herald added a reviewer: sstefan1. · View Herald Transcript
Herald added a reviewer: baziotis. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript

Sorry, this one is slightly longer than the others :-/

bmahjour removed a subscriber: bmahjour.Feb 28 2022, 6:57 AM
MaskRay accepted this revision.Feb 28 2022, 2:38 PM

Sorry, this one is slightly longer than the others :-/

Assuming that you have tested BUILD_SHARED_LIBS=on, and built clang, clang-tools-extra, polly, and mlir.

I find that flang/lldb doesn't use llvm/Analysis, but building them may be useful for other directory cleanups.

llvm/lib/Analysis/CallGraphSCCPass.cpp
42

Just uncondtionally include it? The header does #ifdef EXPENSIVE_CHECKS itself.

llvm/lib/Analysis/RegionPass.cpp
25

ditto

Or perhaps just revert this change

This revision is now accepted and ready to land.Feb 28 2022, 2:38 PM

Rebased on main branch + fix a small build issue

This revision was landed with ongoing or failed builds.Mar 1 2022, 9:02 AM
This revision was automatically updated to reflect the committed changes.
fhahn added a subscriber: fhahn.Mar 1 2022, 11:05 AM

It looks like this commit may be causing a build error with EXPENSIVE_CHECKS enabled. It would be great if you could take a look.

https://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-expensive/21961/console

FAILED: lib/Analysis/CMakeFiles/LLVMAnalysis.dir/LazyCallGraph.cpp.o 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DBUILD_EXAMPLES -DEXPENSIVE_CHECKS -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-expensive/clang-build/lib/Analysis -I/Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-expensive/llvm-project/llvm/lib/Analysis -I/Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-expensive/clang-build/include -I/Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-expensive/llvm-project/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -O3 -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.9  -fno-exceptions -fno-rtti -UNDEBUG -std=c++14 -MD -MT lib/Analysis/CMakeFiles/LLVMAnalysis.dir/LazyCallGraph.cpp.o -MF lib/Analysis/CMakeFiles/LLVMAnalysis.dir/LazyCallGraph.cpp.o.d -o lib/Analysis/CMakeFiles/LLVMAnalysis.dir/LazyCallGraph.cpp.o -c /Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-expensive/llvm-project/llvm/lib/Analysis/LazyCallGraph.cpp
/Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-expensive/llvm-project/llvm/lib/Analysis/LazyCallGraph.cpp:590:23: error: use of undeclared identifier 'make_scope_exit'
  auto VerifyOnExit = make_scope_exit([&]() { verify(); });
                      ^
/Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-expensive/llvm-project/llvm/lib/Analysis/LazyCallGraph.cpp:735:23: error: use of undeclared identifier 'make_scope_exit'
  auto VerifyOnExit = make_scope_exit([&]() { verify(); });
                      ^
/Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-expensive/llvm-project/llvm/lib/Analysis/LazyCallGraph.cpp:755:23: error: use of undeclared identifier 'make_scope_exit'
  auto VerifyOnExit = make_scope_exit([&]() { verify(); });
                      ^
/Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-expensive/llvm-project/llvm/lib/Analysis/LazyCallGraph.cpp:1021:23: error: use of undeclared identifier 'make_scope_exit'
  auto VerifyOnExit = make_scope_exit([&]() { verify(); });
                      ^