llvm.org GIT mirror llvm / a547919
Split Bitcode/ReaderWriter.h into separate reader and writer headers Summary: Split ReaderWriter.h which contains the APIs into both the BitReader and BitWriter libraries into BitcodeReader.h and BitcodeWriter.h. This is to address Chandler's concern about sharing the same API header between multiple libraries (BitReader and BitWriter). That concern is why we create a single bitcode library in our downstream build of clang, which led to r286297 being reverted as it added a dependency that created a cycle only when there is a single bitcode library (not two as in upstream). Reviewers: mehdi_amini Subscribers: dlj, mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D26502 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286566 91177308-0d34-0410-b5e6-96231b3b80d8 Teresa Johnson 2 years ago
30 changed file(s) with 204 addition(s) and 226 deletion(s). Raw diff Collapse all Expand all
2424 #include
2525
2626 namespace llvm {
27 /// Offsets of the 32-bit fields of bitcode wrapper header.
28 static const unsigned BWH_MagicField = 0 * 4;
29 static const unsigned BWH_VersionField = 1 * 4;
30 static const unsigned BWH_OffsetField = 2 * 4;
31 static const unsigned BWH_SizeField = 3 * 4;
32 static const unsigned BWH_CPUTypeField = 4 * 4;
33 static const unsigned BWH_HeaderSize = 5 * 4;
34
2735 namespace bitc {
2836 enum StandardWidths {
2937 BlockIDWidth = 8, // We use VBR-8 for block IDs.
0 //===-- llvm/Bitcode/BitcodeReader.h - Bitcode reader ----*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This header defines interfaces to read LLVM bitcode files/streams.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef LLVM_BITCODE_BITCODEREADER_H
14 #define LLVM_BITCODE_BITCODEREADER_H
15
16 #include "llvm/Bitcode/BitCodes.h"
17 #include "llvm/IR/DiagnosticInfo.h"
18 #include "llvm/IR/ModuleSummaryIndex.h"
19 #include "llvm/Support/Endian.h"
20 #include "llvm/Support/ErrorOr.h"
21 #include "llvm/Support/MemoryBuffer.h"
22 #include
23
24 namespace llvm {
25 class LLVMContext;
26 class Module;
27
28 /// Read the header of the specified bitcode buffer and prepare for lazy
29 /// deserialization of function bodies. If ShouldLazyLoadMetadata is true,
30 /// lazily load metadata as well.
31 ErrorOr>
32 getLazyBitcodeModule(MemoryBufferRef Buffer, LLVMContext &Context,
33 bool ShouldLazyLoadMetadata = false);
34
35 /// Like getLazyBitcodeModule, except that the module takes ownership of
36 /// the memory buffer if successful. If successful, this moves Buffer. On
37 /// error, this *does not* move Buffer.
38 ErrorOr>
39 getOwningLazyBitcodeModule(std::unique_ptr &&Buffer,
40 LLVMContext &Context,
41 bool ShouldLazyLoadMetadata = false);
42
43 /// Read the header of the specified bitcode buffer and extract just the
44 /// triple information. If successful, this returns a string. On error, this
45 /// returns "".
46 std::string getBitcodeTargetTriple(MemoryBufferRef Buffer,
47 LLVMContext &Context);
48
49 /// Return true if \p Buffer contains a bitcode file with ObjC code (category
50 /// or class) in it.
51 bool isBitcodeContainingObjCCategory(MemoryBufferRef Buffer,
52 LLVMContext &Context);
53
54 /// Read the header of the specified bitcode buffer and extract just the
55 /// producer string information. If successful, this returns a string. On
56 /// error, this returns "".
57 std::string getBitcodeProducerString(MemoryBufferRef Buffer,
58 LLVMContext &Context);
59
60 /// Read the specified bitcode file, returning the module.
61 ErrorOr> parseBitcodeFile(MemoryBufferRef Buffer,
62 LLVMContext &Context);
63
64 /// Check if the given bitcode buffer contains a summary block.
65 bool
66 hasGlobalValueSummary(MemoryBufferRef Buffer,
67 const DiagnosticHandlerFunction &DiagnosticHandler);
68
69 /// Parse the specified bitcode buffer, returning the module summary index.
70 ErrorOr>
71 getModuleSummaryIndex(MemoryBufferRef Buffer,
72 const DiagnosticHandlerFunction &DiagnosticHandler);
73
74 /// isBitcodeWrapper - Return true if the given bytes are the magic bytes
75 /// for an LLVM IR bitcode wrapper.
76 ///
77 inline bool isBitcodeWrapper(const unsigned char *BufPtr,
78 const unsigned char *BufEnd) {
79 // See if you can find the hidden message in the magic bytes :-).
80 // (Hint: it's a little-endian encoding.)
81 return BufPtr != BufEnd &&
82 BufPtr[0] == 0xDE &&
83 BufPtr[1] == 0xC0 &&
84 BufPtr[2] == 0x17 &&
85 BufPtr[3] == 0x0B;
86 }
87
88 /// isRawBitcode - Return true if the given bytes are the magic bytes for
89 /// raw LLVM IR bitcode (without a wrapper).
90 ///
91 inline bool isRawBitcode(const unsigned char *BufPtr,
92 const unsigned char *BufEnd) {
93 // These bytes sort of have a hidden message, but it's not in
94 // little-endian this time, and it's a little redundant.
95 return BufPtr != BufEnd &&
96 BufPtr[0] == 'B' &&
97 BufPtr[1] == 'C' &&
98 BufPtr[2] == 0xc0 &&
99 BufPtr[3] == 0xde;
100 }
101
102 /// isBitcode - Return true if the given bytes are the magic bytes for
103 /// LLVM IR bitcode, either with or without a wrapper.
104 ///
105 inline bool isBitcode(const unsigned char *BufPtr,
106 const unsigned char *BufEnd) {
107 return isBitcodeWrapper(BufPtr, BufEnd) ||
108 isRawBitcode(BufPtr, BufEnd);
109 }
110
111 /// SkipBitcodeWrapperHeader - Some systems wrap bc files with a special
112 /// header for padding or other reasons. The format of this header is:
113 ///
114 /// struct bc_header {
115 /// uint32_t Magic; // 0x0B17C0DE
116 /// uint32_t Version; // Version, currently always 0.
117 /// uint32_t BitcodeOffset; // Offset to traditional bitcode file.
118 /// uint32_t BitcodeSize; // Size of traditional bitcode file.
119 /// ... potentially other gunk ...
120 /// };
121 ///
122 /// This function is called when we find a file with a matching magic number.
123 /// In this case, skip down to the subsection of the file that is actually a
124 /// BC file.
125 /// If 'VerifyBufferSize' is true, check that the buffer is large enough to
126 /// contain the whole bitcode file.
127 inline bool SkipBitcodeWrapperHeader(const unsigned char *&BufPtr,
128 const unsigned char *&BufEnd,
129 bool VerifyBufferSize) {
130 // Must contain the offset and size field!
131 if (unsigned(BufEnd - BufPtr) < BWH_SizeField + 4)
132 return true;
133
134 unsigned Offset = support::endian::read32le(&BufPtr[BWH_OffsetField]);
135 unsigned Size = support::endian::read32le(&BufPtr[BWH_SizeField]);
136 uint64_t BitcodeOffsetEnd = (uint64_t)Offset + (uint64_t)Size;
137
138 // Verify that Offset+Size fits in the file.
139 if (VerifyBufferSize && BitcodeOffsetEnd > uint64_t(BufEnd-BufPtr))
140 return true;
141 BufPtr += Offset;
142 BufEnd = BufPtr+Size;
143 return false;
144 }
145
146 const std::error_category &BitcodeErrorCategory();
147 enum class BitcodeError { CorruptedBitcode = 1 };
148 inline std::error_code make_error_code(BitcodeError E) {
149 return std::error_code(static_cast(E), BitcodeErrorCategory());
150 }
151
152 } // End llvm namespace
153
154 namespace std {
155 template <> struct is_error_code_enum : std::true_type {};
156 }
157
158 #endif
+0
-198
include/llvm/Bitcode/ReaderWriter.h less more
None //===-- llvm/Bitcode/ReaderWriter.h - Bitcode reader/writers ----*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This header defines interfaces to read and write LLVM bitcode files/streams.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef LLVM_BITCODE_READERWRITER_H
14 #define LLVM_BITCODE_READERWRITER_H
15
16 #include "llvm/IR/DiagnosticInfo.h"
17 #include "llvm/IR/ModuleSummaryIndex.h"
18 #include "llvm/Support/Endian.h"
19 #include "llvm/Support/ErrorOr.h"
20 #include "llvm/Support/MemoryBuffer.h"
21 #include
22 #include
23
24 namespace llvm {
25 class BitstreamWriter;
26 class LLVMContext;
27 class Module;
28 class ModulePass;
29 class raw_ostream;
30
31 /// Offsets of the 32-bit fields of bitcode wrapper header.
32 static const unsigned BWH_MagicField = 0*4;
33 static const unsigned BWH_VersionField = 1*4;
34 static const unsigned BWH_OffsetField = 2*4;
35 static const unsigned BWH_SizeField = 3*4;
36 static const unsigned BWH_CPUTypeField = 4*4;
37 static const unsigned BWH_HeaderSize = 5*4;
38
39 /// Read the header of the specified bitcode buffer and prepare for lazy
40 /// deserialization of function bodies. If ShouldLazyLoadMetadata is true,
41 /// lazily load metadata as well.
42 ErrorOr>
43 getLazyBitcodeModule(MemoryBufferRef Buffer, LLVMContext &Context,
44 bool ShouldLazyLoadMetadata = false);
45
46 /// Like getLazyBitcodeModule, except that the module takes ownership of
47 /// the memory buffer if successful. If successful, this moves Buffer. On
48 /// error, this *does not* move Buffer.
49 ErrorOr>
50 getOwningLazyBitcodeModule(std::unique_ptr &&Buffer,
51 LLVMContext &Context,
52 bool ShouldLazyLoadMetadata = false);
53
54 /// Read the header of the specified bitcode buffer and extract just the
55 /// triple information. If successful, this returns a string. On error, this
56 /// returns "".
57 std::string getBitcodeTargetTriple(MemoryBufferRef Buffer,
58 LLVMContext &Context);
59
60 /// Return true if \p Buffer contains a bitcode file with ObjC code (category
61 /// or class) in it.
62 bool isBitcodeContainingObjCCategory(MemoryBufferRef Buffer,
63 LLVMContext &Context);
64
65 /// Read the header of the specified bitcode buffer and extract just the
66 /// producer string information. If successful, this returns a string. On
67 /// error, this returns "".
68 std::string getBitcodeProducerString(MemoryBufferRef Buffer,
69 LLVMContext &Context);
70
71 /// Read the specified bitcode file, returning the module.
72 ErrorOr> parseBitcodeFile(MemoryBufferRef Buffer,
73 LLVMContext &Context);
74
75 /// Check if the given bitcode buffer contains a summary block.
76 bool
77 hasGlobalValueSummary(MemoryBufferRef Buffer,
78 const DiagnosticHandlerFunction &DiagnosticHandler);
79
80 /// Parse the specified bitcode buffer, returning the module summary index.
81 ErrorOr>
82 getModuleSummaryIndex(MemoryBufferRef Buffer,
83 const DiagnosticHandlerFunction &DiagnosticHandler);
84
85 /// \brief Write the specified module to the specified raw output stream.
86 ///
87 /// For streams where it matters, the given stream should be in "binary"
88 /// mode.
89 ///
90 /// If \c ShouldPreserveUseListOrder, encode the use-list order for each \a
91 /// Value in \c M. These will be reconstructed exactly when \a M is
92 /// deserialized.
93 ///
94 /// If \c Index is supplied, the bitcode will contain the summary index
95 /// (currently for use in ThinLTO optimization).
96 ///
97 /// \p GenerateHash enables hashing the Module and including the hash in the
98 /// bitcode (currently for use in ThinLTO incremental build).
99 void WriteBitcodeToFile(const Module *M, raw_ostream &Out,
100 bool ShouldPreserveUseListOrder = false,
101 const ModuleSummaryIndex *Index = nullptr,
102 bool GenerateHash = false);
103
104 /// Write the specified module summary index to the given raw output stream,
105 /// where it will be written in a new bitcode block. This is used when
106 /// writing the combined index file for ThinLTO. When writing a subset of the
107 /// index for a distributed backend, provide the \p ModuleToSummariesForIndex
108 /// map.
109 void WriteIndexToFile(const ModuleSummaryIndex &Index, raw_ostream &Out,
110 const std::map
111 *ModuleToSummariesForIndex = nullptr);
112
113 /// isBitcodeWrapper - Return true if the given bytes are the magic bytes
114 /// for an LLVM IR bitcode wrapper.
115 ///
116 inline bool isBitcodeWrapper(const unsigned char *BufPtr,
117 const unsigned char *BufEnd) {
118 // See if you can find the hidden message in the magic bytes :-).
119 // (Hint: it's a little-endian encoding.)
120 return BufPtr != BufEnd &&
121 BufPtr[0] == 0xDE &&
122 BufPtr[1] == 0xC0 &&
123 BufPtr[2] == 0x17 &&
124 BufPtr[3] == 0x0B;
125 }
126
127 /// isRawBitcode - Return true if the given bytes are the magic bytes for
128 /// raw LLVM IR bitcode (without a wrapper).
129 ///
130 inline bool isRawBitcode(const unsigned char *BufPtr,
131 const unsigned char *BufEnd) {
132 // These bytes sort of have a hidden message, but it's not in
133 // little-endian this time, and it's a little redundant.
134 return BufPtr != BufEnd &&
135 BufPtr[0] == 'B' &&
136 BufPtr[1] == 'C' &&
137 BufPtr[2] == 0xc0 &&
138 BufPtr[3] == 0xde;
139 }
140
141 /// isBitcode - Return true if the given bytes are the magic bytes for
142 /// LLVM IR bitcode, either with or without a wrapper.
143 ///
144 inline bool isBitcode(const unsigned char *BufPtr,
145 const unsigned char *BufEnd) {
146 return isBitcodeWrapper(BufPtr, BufEnd) ||
147 isRawBitcode(BufPtr, BufEnd);
148 }
149
150 /// SkipBitcodeWrapperHeader - Some systems wrap bc files with a special
151 /// header for padding or other reasons. The format of this header is:
152 ///
153 /// struct bc_header {
154 /// uint32_t Magic; // 0x0B17C0DE
155 /// uint32_t Version; // Version, currently always 0.
156 /// uint32_t BitcodeOffset; // Offset to traditional bitcode file.
157 /// uint32_t BitcodeSize; // Size of traditional bitcode file.
158 /// ... potentially other gunk ...
159 /// };
160 ///
161 /// This function is called when we find a file with a matching magic number.
162 /// In this case, skip down to the subsection of the file that is actually a
163 /// BC file.
164 /// If 'VerifyBufferSize' is true, check that the buffer is large enough to
165 /// contain the whole bitcode file.
166 inline bool SkipBitcodeWrapperHeader(const unsigned char *&BufPtr,
167 const unsigned char *&BufEnd,
168 bool VerifyBufferSize) {
169 // Must contain the offset and size field!
170 if (unsigned(BufEnd - BufPtr) < BWH_SizeField + 4)
171 return true;
172
173 unsigned Offset = support::endian::read32le(&BufPtr[BWH_OffsetField]);
174 unsigned Size = support::endian::read32le(&BufPtr[BWH_SizeField]);
175 uint64_t BitcodeOffsetEnd = (uint64_t)Offset + (uint64_t)Size;
176
177 // Verify that Offset+Size fits in the file.
178 if (VerifyBufferSize && BitcodeOffsetEnd > uint64_t(BufEnd-BufPtr))
179 return true;
180 BufPtr += Offset;
181 BufEnd = BufPtr+Size;
182 return false;
183 }
184
185 const std::error_category &BitcodeErrorCategory();
186 enum class BitcodeError { CorruptedBitcode = 1 };
187 inline std::error_code make_error_code(BitcodeError E) {
188 return std::error_code(static_cast(E), BitcodeErrorCategory());
189 }
190
191 } // End llvm namespace
192
193 namespace std {
194 template <> struct is_error_code_enum : std::true_type {};
195 }
196
197 #endif
88
99 #include "llvm-c/BitReader.h"
1010 #include "llvm-c/Core.h"
11 #include "llvm/Bitcode/ReaderWriter.h"
11 #include "llvm/Bitcode/BitcodeReader.h"
1212 #include "llvm/IR/DiagnosticPrinter.h"
1313 #include "llvm/IR/LLVMContext.h"
1414 #include "llvm/IR/Module.h"
66 //
77 //===----------------------------------------------------------------------===//
88
9 #include "llvm/Bitcode/BitcodeReader.h"
910 #include "llvm/ADT/APFloat.h"
1011 #include "llvm/ADT/APInt.h"
1112 #include "llvm/ADT/ArrayRef.h"
1920 #include "llvm/ADT/Twine.h"
2021 #include "llvm/Bitcode/BitstreamReader.h"
2122 #include "llvm/Bitcode/LLVMBitCodes.h"
22 #include "llvm/Bitcode/ReaderWriter.h"
2323 #include "llvm/IR/Argument.h"
2424 #include "llvm/IR/Attributes.h"
2525 #include "llvm/IR/AutoUpgrade.h"
77 //===----------------------------------------------------------------------===//
88
99 #include "llvm-c/BitWriter.h"
10 #include "llvm/Bitcode/ReaderWriter.h"
10 #include "llvm/Bitcode/BitcodeWriter.h"
1111 #include "llvm/IR/Module.h"
1212 #include "llvm/Support/FileSystem.h"
13 #include "llvm/Support/MemoryBuffer.h"
1314 #include "llvm/Support/raw_ostream.h"
1415 using namespace llvm;
1516
1010 //
1111 //===----------------------------------------------------------------------===//
1212
13 #include "llvm/Bitcode/BitcodeWriter.h"
1314 #include "ValueEnumerator.h"
1415 #include "llvm/ADT/StringExtras.h"
1516 #include "llvm/ADT/Triple.h"
1617 #include "llvm/Bitcode/BitstreamWriter.h"
1718 #include "llvm/Bitcode/LLVMBitCodes.h"
18 #include "llvm/Bitcode/ReaderWriter.h"
1919 #include "llvm/IR/CallSite.h"
2020 #include "llvm/IR/Constants.h"
2121 #include "llvm/IR/DebugInfoMetadata.h"
1212
1313 #include "llvm/Bitcode/BitcodeWriterPass.h"
1414 #include "llvm/Analysis/ModuleSummaryAnalysis.h"
15 #include "llvm/Bitcode/ReaderWriter.h"
15 #include "llvm/Bitcode/BitcodeWriter.h"
1616 #include "llvm/IR/Module.h"
1717 #include "llvm/IR/PassManager.h"
1818 #include "llvm/Pass.h"
1111 //===----------------------------------------------------------------------===//
1212
1313 #include "llvm/CodeGen/ParallelCG.h"
14 #include "llvm/Bitcode/ReaderWriter.h"
14 #include "llvm/Bitcode/BitcodeReader.h"
15 #include "llvm/Bitcode/BitcodeWriter.h"
1516 #include "llvm/IR/LLVMContext.h"
1617 #include "llvm/IR/LegacyPassManager.h"
1718 #include "llvm/IR/Module.h"
1313
1414 #include "llvm-c/Core.h"
1515 #include "llvm/ADT/StringSwitch.h"
16 #include "llvm/Bitcode/ReaderWriter.h"
16 #include "llvm/Bitcode/BitcodeReader.h"
1717 #include "llvm/IR/Attributes.h"
1818 #include "AttributeSetNode.h"
1919 #include "llvm/IR/CallSite.h"
1010 #include "llvm-c/Core.h"
1111 #include "llvm-c/IRReader.h"
1212 #include "llvm/AsmParser/Parser.h"
13 #include "llvm/Bitcode/ReaderWriter.h"
13 #include "llvm/Bitcode/BitcodeReader.h"
1414 #include "llvm/IR/LLVMContext.h"
1515 #include "llvm/IR/Module.h"
1616 #include "llvm/Support/MemoryBuffer.h"
1313 #include "llvm/LTO/LTO.h"
1414 #include "llvm/Analysis/TargetLibraryInfo.h"
1515 #include "llvm/Analysis/TargetTransformInfo.h"
16 #include "llvm/Bitcode/ReaderWriter.h"
16 #include "llvm/Bitcode/BitcodeReader.h"
17 #include "llvm/Bitcode/BitcodeWriter.h"
1718 #include "llvm/CodeGen/Analysis.h"
1819 #include "llvm/IR/AutoUpgrade.h"
1920 #include "llvm/IR/DiagnosticPrinter.h"
1919 #include "llvm/Analysis/LoopPassManager.h"
2020 #include "llvm/Analysis/TargetLibraryInfo.h"
2121 #include "llvm/Analysis/TargetTransformInfo.h"
22 #include "llvm/Bitcode/ReaderWriter.h"
22 #include "llvm/Bitcode/BitcodeReader.h"
23 #include "llvm/Bitcode/BitcodeWriter.h"
2324 #include "llvm/IR/LegacyPassManager.h"
2425 #include "llvm/IR/PassManager.h"
2526 #include "llvm/IR/Verifier.h"
1818 #include "llvm/Analysis/Passes.h"
1919 #include "llvm/Analysis/TargetLibraryInfo.h"
2020 #include "llvm/Analysis/TargetTransformInfo.h"
21 #include "llvm/Bitcode/ReaderWriter.h"
21 #include "llvm/Bitcode/BitcodeWriter.h"
2222 #include "llvm/CodeGen/ParallelCG.h"
2323 #include "llvm/CodeGen/RuntimeLibcalls.h"
2424 #include "llvm/Config/config.h"
1313
1414 #include "llvm/LTO/legacy/LTOModule.h"
1515 #include "llvm/ADT/Triple.h"
16 #include "llvm/Bitcode/ReaderWriter.h"
16 #include "llvm/Bitcode/BitcodeReader.h"
1717 #include "llvm/CodeGen/Analysis.h"
1818 #include "llvm/IR/Constants.h"
1919 #include "llvm/IR/DiagnosticPrinter.h"
2323 #include "llvm/Analysis/ProfileSummaryInfo.h"
2424 #include "llvm/Analysis/TargetLibraryInfo.h"
2525 #include "llvm/Analysis/TargetTransformInfo.h"
26 #include "llvm/Bitcode/BitcodeReader.h"
27 #include "llvm/Bitcode/BitcodeWriter.h"
2628 #include "llvm/Bitcode/BitcodeWriterPass.h"
27 #include "llvm/Bitcode/ReaderWriter.h"
2829 #include "llvm/ExecutionEngine/ObjectMemoryBuffer.h"
2930 #include "llvm/IR/DiagnosticPrinter.h"
3031 #include "llvm/IR/LLVMContext.h"
1313 #include "llvm/Object/IRObjectFile.h"
1414 #include "RecordStreamer.h"
1515 #include "llvm/ADT/STLExtras.h"
16 #include "llvm/Bitcode/ReaderWriter.h"
16 #include "llvm/Bitcode/BitcodeReader.h"
1717 #include "llvm/IR/GVMaterializer.h"
1818 #include "llvm/IR/LLVMContext.h"
1919 #include "llvm/IR/Mangler.h"
1212
1313 #include "llvm/Object/ModuleSummaryIndexObjectFile.h"
1414 #include "llvm/ADT/STLExtras.h"
15 #include "llvm/Bitcode/ReaderWriter.h"
15 #include "llvm/Bitcode/BitcodeReader.h"
1616 #include "llvm/IR/ModuleSummaryIndex.h"
1717 #include "llvm/MC/MCStreamer.h"
1818 #include "llvm/Object/ObjectFile.h"
1515 //===----------------------------------------------------------------------===//
1616
1717 #include "BugDriver.h"
18 #include "llvm/Bitcode/ReaderWriter.h"
18 #include "llvm/Bitcode/BitcodeWriter.h"
1919 #include "llvm/IR/DataLayout.h"
2020 #include "llvm/IR/LegacyPassManager.h"
2121 #include "llvm/IR/Module.h"
1111 //
1212 //===----------------------------------------------------------------------===//
1313
14 #include "llvm/Bitcode/ReaderWriter.h"
14 #include "llvm/Bitcode/BitcodeReader.h"
15 #include "llvm/Bitcode/BitcodeWriter.h"
1516 #include "llvm/CodeGen/CommandFlags.h"
1617 #include "llvm/Config/config.h" // plugin-api.h requires HAVE_STDINT_H
1718 #include "llvm/IR/Constants.h"
1717 #include "llvm/IR/LLVMContext.h"
1818 #include "llvm/ADT/StringExtras.h"
1919 #include "llvm/ADT/Triple.h"
20 #include "llvm/Bitcode/ReaderWriter.h"
20 #include "llvm/Bitcode/BitcodeReader.h"
2121 #include "llvm/CodeGen/LinkAllCodegenComponents.h"
2222 #include "llvm/ExecutionEngine/GenericValue.h"
2323 #include "llvm/ExecutionEngine/Interpreter.h"
1515 //===----------------------------------------------------------------------===//
1616
1717 #include "llvm/AsmParser/Parser.h"
18 #include "llvm/Bitcode/ReaderWriter.h"
18 #include "llvm/Bitcode/BitcodeWriter.h"
1919 #include "llvm/IR/LLVMContext.h"
2020 #include "llvm/IR/Module.h"
2121 #include "llvm/IR/Verifier.h"
2727 //===----------------------------------------------------------------------===//
2828
2929 #include "llvm/ADT/StringExtras.h"
30 #include "llvm/Bitcode/BitcodeReader.h"
3031 #include "llvm/Bitcode/BitstreamReader.h"
3132 #include "llvm/Bitcode/LLVMBitCodes.h"
32 #include "llvm/Bitcode/ReaderWriter.h"
3333 #include "llvm/IR/Verifier.h"
3434 #include "llvm/Support/CommandLine.h"
3535 #include "llvm/Support/Format.h"
1616 //===----------------------------------------------------------------------===//
1717
1818 #include "llvm/IR/LLVMContext.h"
19 #include "llvm/Bitcode/ReaderWriter.h"
19 #include "llvm/Bitcode/BitcodeReader.h"
2020 #include "llvm/IR/AssemblyAnnotationWriter.h"
2121 #include "llvm/IR/DebugInfo.h"
2222 #include "llvm/IR/DiagnosticInfo.h"
1212 //===----------------------------------------------------------------------===//
1313
1414 #include "llvm/ADT/STLExtras.h"
15 #include "llvm/Bitcode/ReaderWriter.h"
15 #include "llvm/Bitcode/BitcodeWriter.h"
1616 #include "llvm/IR/AutoUpgrade.h"
1717 #include "llvm/IR/DiagnosticInfo.h"
1818 #include "llvm/IR/DiagnosticPrinter.h"
1212 //===----------------------------------------------------------------------===//
1313
1414 #include "llvm/ADT/StringSet.h"
15 #include "llvm/Bitcode/ReaderWriter.h"
15 #include "llvm/Bitcode/BitcodeReader.h"
16 #include "llvm/Bitcode/BitcodeWriter.h"
1617 #include "llvm/CodeGen/CommandFlags.h"
1718 #include "llvm/IR/DiagnosticPrinter.h"
1819 #include "llvm/IR/LLVMContext.h"
1111 //===----------------------------------------------------------------------===//
1212
1313 #include "llvm/ADT/StringExtras.h"
14 #include "llvm/Bitcode/ReaderWriter.h"
14 #include "llvm/Bitcode/BitcodeWriter.h"
1515 #include "llvm/IR/LLVMContext.h"
1616 #include "llvm/IR/Verifier.h"
1717 #include "llvm/IRReader/IRReader.h"
1313
1414 #include "llvm-c/lto.h"
1515 #include "llvm/ADT/STLExtras.h"
16 #include "llvm/Bitcode/ReaderWriter.h"
16 #include "llvm/Bitcode/BitcodeReader.h"
1717 #include "llvm/CodeGen/CommandFlags.h"
1818 #include "llvm/IR/DiagnosticInfo.h"
1919 #include "llvm/IR/DiagnosticPrinter.h"
2929 #include "llvm/ADT/DenseMap.h"
3030 #include "llvm/ADT/DenseSet.h"
3131 #include "llvm/AsmParser/Parser.h"
32 #include "llvm/Bitcode/ReaderWriter.h"
32 #include "llvm/Bitcode/BitcodeReader.h"
33 #include "llvm/Bitcode/BitcodeWriter.h"
3334 #include "llvm/IR/LLVMContext.h"
3435 #include "llvm/IR/Module.h"
3536 #include "llvm/IR/UseListOrder.h"
66 //
77 //===----------------------------------------------------------------------===//
88
9 #include "llvm/ADT/STLExtras.h"
910 #include "llvm/ADT/SmallString.h"
10 #include "llvm/ADT/STLExtras.h"
1111 #include "llvm/AsmParser/Parser.h"
12 #include "llvm/Bitcode/BitcodeReader.h"
13 #include "llvm/Bitcode/BitcodeWriter.h"
1214 #include "llvm/Bitcode/BitstreamReader.h"
1315 #include "llvm/Bitcode/BitstreamWriter.h"
14 #include "llvm/Bitcode/ReaderWriter.h"
1516 #include "llvm/IR/Constants.h"
1617 #include "llvm/IR/Instructions.h"
1718 #include "llvm/IR/LLVMContext.h"