diff options
| author | Zalathar <Zalathar@users.noreply.github.com> | 2024-11-03 21:09:01 +1100 |
|---|---|---|
| committer | Zalathar <Zalathar@users.noreply.github.com> | 2024-11-04 16:35:39 +1100 |
| commit | 920d2774ac92b102dedf07d04d5fd80214881699 (patch) | |
| tree | 15e9c9683003c14980f0cdff959031c8fc1f31e2 /compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h | |
| parent | 44a056a50b5eecad9e16188d18ea55011c153e7a (diff) | |
| download | rust-920d2774ac92b102dedf07d04d5fd80214881699.tar.gz rust-920d2774ac92b102dedf07d04d5fd80214881699.zip | |
Trim and tidy includes in `rustc_llvm`
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h | 53 |
1 files changed, 9 insertions, 44 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h b/compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h index f2bfdfed8d2..40714eb8dbe 100644 --- a/compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h +++ b/compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h @@ -1,31 +1,12 @@ +#ifndef INCLUDED_RUSTC_LLVM_LLVMWRAPPER_H +#define INCLUDED_RUSTC_LLVM_LLVMWRAPPER_H + #include "SuppressLLVMWarnings.h" -#include "llvm-c/BitReader.h" -#include "llvm-c/Core.h" -#include "llvm-c/Object.h" -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/DenseSet.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/Analysis/Lint.h" -#include "llvm/Analysis/Passes.h" -#include "llvm/IR/IRBuilder.h" -#include "llvm/IR/InlineAsm.h" -#include "llvm/IR/LLVMContext.h" -#include "llvm/IR/Module.h" -#include "llvm/Support/CommandLine.h" -#include "llvm/Support/Debug.h" -#include "llvm/Support/DynamicLibrary.h" -#include "llvm/Support/FormattedStream.h" -#include "llvm/Support/JSON.h" -#include "llvm/Support/Memory.h" -#include "llvm/Support/SourceMgr.h" -#include "llvm/Support/TargetSelect.h" -#include "llvm/Support/Timer.h" -#include "llvm/Support/raw_ostream.h" -#include "llvm/Target/TargetMachine.h" -#include "llvm/Target/TargetOptions.h" -#include "llvm/Transforms/IPO.h" -#include "llvm/Transforms/Scalar.h" +#include "llvm/Config/llvm-config.h" // LLVM_VERSION_MAJOR, LLVM_VERSION_MINOR +#include "llvm/Support/raw_ostream.h" // llvm::raw_ostream +#include <cstddef> // size_t etc +#include <cstdint> // uint64_t etc #define LLVM_VERSION_GE(major, minor) \ (LLVM_VERSION_MAJOR > (major) || \ @@ -33,24 +14,6 @@ #define LLVM_VERSION_LT(major, minor) (!LLVM_VERSION_GE((major), (minor))) -#if LLVM_VERSION_GE(20, 0) -#include "llvm/Transforms/Utils/Instrumentation.h" -#else -#include "llvm/Transforms/Instrumentation.h" -#endif - -#include "llvm/IR/LegacyPassManager.h" - -#include "llvm/Bitcode/BitcodeReader.h" -#include "llvm/Bitcode/BitcodeWriter.h" - -#include "llvm/IR/DIBuilder.h" -#include "llvm/IR/DebugInfo.h" -#include "llvm/IR/IRPrintingPasses.h" -#include "llvm/Linker/Linker.h" - -#include "llvm/TargetParser/Triple.h" - extern "C" void LLVMRustSetLastError(const char *); enum class LLVMRustResult { Success, Failure }; @@ -81,3 +44,5 @@ public: flush(); } }; + +#endif // INCLUDED_RUSTC_LLVM_LLVMWRAPPER_H |
