Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LTO] Remove unused includes (NFC) #108110

Merged

Conversation

kazutakahirata
Copy link
Contributor

clangd reports these as unused headers. My manual inspection agrees
with the findings.

clangd reports these as unused headers.  My manual inspection agrees
with the findings.
@llvmbot llvmbot added LTO Link time optimization (regular/full LTO or ThinLTO) llvm:transforms labels Sep 10, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Sep 10, 2024

@llvm/pr-subscribers-llvm-transforms

@llvm/pr-subscribers-lto

Author: Kazu Hirata (kazutakahirata)

Changes

clangd reports these as unused headers. My manual inspection agrees
with the findings.


Full diff: https://github.com/llvm/llvm-project/pull/108110.diff

4 Files Affected:

  • (modified) llvm/include/llvm/LTO/LTO.h (-1)
  • (modified) llvm/include/llvm/Transforms/IPO/FunctionImport.h (-2)
  • (modified) llvm/lib/LTO/LTO.cpp (-1)
  • (modified) llvm/lib/Transforms/IPO/FunctionImport.cpp (-1)
diff --git a/llvm/include/llvm/LTO/LTO.h b/llvm/include/llvm/LTO/LTO.h
index fc6e93606de122..214aa4e1c562dc 100644
--- a/llvm/include/llvm/LTO/LTO.h
+++ b/llvm/include/llvm/LTO/LTO.h
@@ -19,7 +19,6 @@
 
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/MapVector.h"
-#include "llvm/ADT/StringMap.h"
 #include "llvm/Bitcode/BitcodeReader.h"
 #include "llvm/IR/ModuleSummaryIndex.h"
 #include "llvm/LTO/Config.h"
diff --git a/llvm/include/llvm/Transforms/IPO/FunctionImport.h b/llvm/include/llvm/Transforms/IPO/FunctionImport.h
index 0a6cc5951b706a..70739709a810ab 100644
--- a/llvm/include/llvm/Transforms/IPO/FunctionImport.h
+++ b/llvm/include/llvm/Transforms/IPO/FunctionImport.h
@@ -17,9 +17,7 @@
 #include "llvm/IR/PassManager.h"
 #include "llvm/Support/Error.h"
 #include <functional>
-#include <map>
 #include <memory>
-#include <string>
 #include <system_error>
 #include <utility>
 
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp
index 5d9a5cbd18f156..a88124dacfaefd 100644
--- a/llvm/lib/LTO/LTO.cpp
+++ b/llvm/lib/LTO/LTO.cpp
@@ -38,7 +38,6 @@
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Error.h"
 #include "llvm/Support/FileSystem.h"
-#include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/Path.h"
 #include "llvm/Support/SHA1.h"
diff --git a/llvm/lib/Transforms/IPO/FunctionImport.cpp b/llvm/lib/Transforms/IPO/FunctionImport.cpp
index 1aac8e07135875..ff0d78178bd188 100644
--- a/llvm/lib/Transforms/IPO/FunctionImport.cpp
+++ b/llvm/lib/Transforms/IPO/FunctionImport.cpp
@@ -46,7 +46,6 @@
 #include "llvm/Transforms/Utils/ValueMapper.h"
 #include <cassert>
 #include <memory>
-#include <set>
 #include <string>
 #include <system_error>
 #include <tuple>

@kazutakahirata kazutakahirata merged commit 3dad29b into llvm:main Sep 11, 2024
11 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_thinlto_unused_headers branch September 11, 2024 02:36
VitaNuo pushed a commit to VitaNuo/llvm-project that referenced this pull request Sep 12, 2024
clangd reports these as unused headers.  My manual inspection agrees
with the findings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
llvm:transforms LTO Link time optimization (regular/full LTO or ThinLTO)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants