aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
diff options
context:
space:
mode:
authorserge-sans-paille <sguelton@redhat.com>2022-02-04 12:00:40 +0100
committerserge-sans-paille <sguelton@redhat.com>2022-02-07 21:19:22 +0100
commit1237c1496ff301da71be4702c7513df172937ecf (patch)
treed43e95ed9b4192cf0328eb8e971b033607a100a3 /llvm/lib/Bitcode/Reader/MetadataLoader.cpp
parent7ee8bd60f225b36623114f52103b0ecb91e2fb64 (diff)
downloadllvm-1237c1496ff301da71be4702c7513df172937ecf.zip
llvm-1237c1496ff301da71be4702c7513df172937ecf.tar.gz
llvm-1237c1496ff301da71be4702c7513df172937ecf.tar.bz2
Cleanup LLVMBitcode headers
Major user-facing changes: llvm/Bitcode/BitcodeReader.h no longer includes llvm/IR/ModuleSummaryIndex.h Some statistics: clang++ -E -Iinclude -I../llvm/include ../llvm/lib/Bitcode/Reader/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -l after: 493335 before: 539640 Discourse thread on the topic: https://discourse.llvm.org/t/include-what-you-use-include-cleanup/ Differential Revision: https://reviews.llvm.org/D119091
Diffstat (limited to 'llvm/lib/Bitcode/Reader/MetadataLoader.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/MetadataLoader.cpp51
1 files changed, 18 insertions, 33 deletions
diff --git a/llvm/lib/Bitcode/Reader/MetadataLoader.cpp b/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
index 158405f..29a909d 100644
--- a/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
+++ b/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
@@ -9,75 +9,60 @@
#include "MetadataLoader.h"
#include "ValueList.h"
-#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
+#include "llvm/ADT/BitmaskEnum.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/None.h"
-#include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/Optional.h"
+#include "llvm/ADT/STLFunctionalExtras.h"
#include "llvm/ADT/SmallString.h"
+#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
+#include "llvm/ADT/ilist_iterator.h"
+#include "llvm/ADT/iterator_range.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/Bitcode/BitcodeReader.h"
#include "llvm/Bitcode/LLVMBitCodes.h"
#include "llvm/Bitstream/BitstreamReader.h"
-#include "llvm/IR/Argument.h"
-#include "llvm/IR/Attributes.h"
#include "llvm/IR/AutoUpgrade.h"
#include "llvm/IR/BasicBlock.h"
-#include "llvm/IR/CallingConv.h"
-#include "llvm/IR/Comdat.h"
-#include "llvm/IR/Constant.h"
#include "llvm/IR/Constants.h"
-#include "llvm/IR/DebugInfo.h"
#include "llvm/IR/DebugInfoMetadata.h"
-#include "llvm/IR/DebugLoc.h"
-#include "llvm/IR/DerivedTypes.h"
-#include "llvm/IR/DiagnosticPrinter.h"
#include "llvm/IR/Function.h"
-#include "llvm/IR/GVMaterializer.h"
-#include "llvm/IR/GlobalAlias.h"
-#include "llvm/IR/GlobalIFunc.h"
#include "llvm/IR/GlobalObject.h"
-#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/GlobalVariable.h"
-#include "llvm/IR/InlineAsm.h"
-#include "llvm/IR/InstrTypes.h"
#include "llvm/IR/Instruction.h"
-#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
-#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/LLVMContext.h"
+#include "llvm/IR/Metadata.h"
#include "llvm/IR/Module.h"
-#include "llvm/IR/ModuleSummaryIndex.h"
-#include "llvm/IR/OperandTraits.h"
#include "llvm/IR/TrackingMDRef.h"
#include "llvm/IR/Type.h"
-#include "llvm/IR/ValueHandle.h"
-#include "llvm/Support/AtomicOrdering.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
-#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
-#include "llvm/Support/ManagedStatic.h"
-#include "llvm/Support/MemoryBuffer.h"
-#include "llvm/Support/raw_ostream.h"
+#include "llvm/Support/type_traits.h"
+
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <deque>
+#include <iterator>
#include <limits>
-#include <map>
#include <string>
-#include <system_error>
#include <tuple>
+#include <type_traits>
#include <utility>
#include <vector>
+namespace llvm {
+class Argument;
+}
using namespace llvm;
@@ -679,8 +664,8 @@ public:
bool hasSeenOldLoopTags() const { return HasSeenOldLoopTags; }
- Error parseMetadataAttachment(
- Function &F, const SmallVectorImpl<Instruction *> &InstructionList);
+ Error parseMetadataAttachment(Function &F,
+ ArrayRef<Instruction *> InstructionList);
Error parseMetadataKinds();
@@ -2182,7 +2167,7 @@ Error MetadataLoader::MetadataLoaderImpl::parseGlobalObjectAttachment(
/// Parse metadata attachments.
Error MetadataLoader::MetadataLoaderImpl::parseMetadataAttachment(
- Function &F, const SmallVectorImpl<Instruction *> &InstructionList) {
+ Function &F, ArrayRef<Instruction *> InstructionList) {
if (Error Err = Stream.EnterSubBlock(bitc::METADATA_ATTACHMENT_ID))
return Err;
@@ -2358,7 +2343,7 @@ DISubprogram *MetadataLoader::lookupSubprogramForFunction(Function *F) {
}
Error MetadataLoader::parseMetadataAttachment(
- Function &F, const SmallVectorImpl<Instruction *> &InstructionList) {
+ Function &F, ArrayRef<Instruction *> InstructionList) {
return Pimpl->parseMetadataAttachment(F, InstructionList);
}