Skip to content

Commit ae7a290

Browse files
committed
[WIP] Add custom bitcoder
1 parent 4ce34f1 commit ae7a290

File tree

2 files changed

+486
-0
lines changed

2 files changed

+486
-0
lines changed

llvm/include/llvm/Bitcode/BitcodeWriter.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <memory>
2424
#include <string>
2525
#include <vector>
26+
#include "llvm/ADT/DenseMap.h"
2627

2728
namespace llvm {
2829

@@ -93,6 +94,18 @@ class BitcodeWriter {
9394
bool GenerateHash = false,
9495
ModuleHash *ModHash = nullptr);
9596

97+
98+
99+
//This is for Writing Backword Compatible Bitcode with Non-Opaque types
100+
101+
LLVM_ABI void writeBitcodeWithNonOpaqueTypes(const Module &M,
102+
bool ShouldPreserveUseListOrder = false,
103+
const ModuleSummaryIndex *Index = nullptr,
104+
bool GenerateHash = false,
105+
ModuleHash *ModHash = nullptr,
106+
bool WriteNonOpaqueTypes = true,
107+
DenseMap<const Value *, Type *> *NonOpaqueTypeMap = nullptr);
108+
96109
/// Write the specified thin link bitcode file (i.e., the minimized bitcode
97110
/// file) to the buffer specified at construction time. The thin link
98111
/// bitcode file is used for thin link, and it only contains the necessary

0 commit comments

Comments
 (0)