summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/Driver.h3
-rw-r--r--lld/ELF/LTO.cpp21
-rw-r--r--lld/ELF/LTO.h3
-rw-r--r--lld/ELF/Writer.cpp1
4 files changed, 3 insertions, 25 deletions
diff --git a/lld/ELF/Driver.h b/lld/ELF/Driver.h
index cdb19f561d8..1acbdd0a866 100644
--- a/lld/ELF/Driver.h
+++ b/lld/ELF/Driver.h
@@ -16,6 +16,7 @@
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSet.h"
+#include "llvm/IR/LLVMContext.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Support/raw_ostream.h"
@@ -29,7 +30,7 @@ public:
void main(ArrayRef<const char *> Args);
void addFile(StringRef Path, bool KnownScript = false);
void addLibrary(StringRef Name);
- llvm::LLVMContext Context; // to parse bitcode ifles
+ llvm::LLVMContext Context; // to parse bitcode files
std::unique_ptr<CpioFile> Cpio; // for reproduce
private:
diff --git a/lld/ELF/LTO.cpp b/lld/ELF/LTO.cpp
index 26f9832781b..6b9696b4100 100644
--- a/lld/ELF/LTO.cpp
+++ b/lld/ELF/LTO.cpp
@@ -9,33 +9,12 @@
#include "LTO.h"
#include "Config.h"
-#include "Driver.h"
#include "Error.h"
#include "InputFiles.h"
#include "Symbols.h"
-#include "llvm/Analysis/AliasAnalysis.h"
-#include "llvm/Analysis/CGSCCPassManager.h"
-#include "llvm/Analysis/LoopPassManager.h"
-#include "llvm/Analysis/TargetLibraryInfo.h"
-#include "llvm/Analysis/TargetTransformInfo.h"
-#include "llvm/Bitcode/ReaderWriter.h"
#include "llvm/CodeGen/CommandFlags.h"
-#include "llvm/CodeGen/ParallelCG.h"
-#include "llvm/IR/AutoUpgrade.h"
#include "llvm/IR/DiagnosticPrinter.h"
-#include "llvm/IR/LegacyPassManager.h"
-#include "llvm/IR/PassManager.h"
-#include "llvm/IR/Verifier.h"
#include "llvm/LTO/LTO.h"
-#include "llvm/LTO/legacy/UpdateCompilerUsed.h"
-#include "llvm/Linker/IRMover.h"
-#include "llvm/Passes/PassBuilder.h"
-#include "llvm/Support/StringSaver.h"
-#include "llvm/Support/TargetRegistry.h"
-#include "llvm/Target/TargetMachine.h"
-#include "llvm/Transforms/IPO.h"
-#include "llvm/Transforms/IPO/PassManagerBuilder.h"
-#include "llvm/Transforms/Utils/ModuleUtils.h"
using namespace llvm;
using namespace llvm::object;
diff --git a/lld/ELF/LTO.h b/lld/ELF/LTO.h
index 916c01895e1..6011f01bb13 100644
--- a/lld/ELF/LTO.h
+++ b/lld/ELF/LTO.h
@@ -23,9 +23,6 @@
#include "lld/Core/LLVM.h"
#include "llvm/ADT/SmallString.h"
-#include "llvm/ADT/StringSet.h"
-#include "llvm/IR/Module.h"
-#include "llvm/Linker/IRMover.h"
namespace llvm {
namespace lto {
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 9df5939e83d..71e9ba2fe77 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -21,6 +21,7 @@
#include "llvm/Support/FileOutputBuffer.h"
#include "llvm/Support/StringSaver.h"
#include "llvm/Support/raw_ostream.h"
+#include <climits>
using namespace llvm;
using namespace llvm::ELF;
OpenPOWER on IntegriCloud