LLVM API Documentation

Bytecode/Writer/Writer.cpp File Reference

#include "WriterInternals.h"
#include "llvm/Bytecode/WriteBytecodePass.h"
#include "llvm/CallingConv.h"
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/InlineAsm.h"
#include "llvm/Instructions.h"
#include "llvm/Module.h"
#include "llvm/SymbolTable.h"
#include "llvm/Support/GetElementPtrTypeIterator.h"
#include "llvm/Support/Compressor.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/System/Program.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/Statistic.h"
#include <cstring>
#include <algorithm>

Include dependency graph for Bytecode/Writer/Writer.cpp:

Go to the source code of this file.

Functions

static bool hasNullValue (const Type *Ty)
static unsigned getEncodedLinkage (const GlobalValue *GV)
void llvm::WriteBytecodeToFile (const Module *M, std::ostream &Out, bool compress)

Variables

const unsigned BCVersionNum = 5
 The bytecode version number.
static RegisterPass< WriteBytecodePassX ("emitbytecode","Bytecode Writer")
static Statistic BytesWritten ("bytecodewriter","Number of bytecode bytes written")


Function Documentation

static unsigned getEncodedLinkage ( const GlobalValue GV  )  [static]

Definition at line 938 of file Bytecode/Writer/Writer.cpp.

References llvm::GlobalValue::AppendingLinkage, llvm::GlobalValue::ExternalLinkage, llvm::GlobalValue::getLinkage(), GV, llvm::GlobalValue::InternalLinkage, llvm::GlobalValue::LinkOnceLinkage, and llvm::GlobalValue::WeakLinkage.

static bool hasNullValue ( const Type Ty  )  [inline, static]

Definition at line 902 of file Bytecode/Writer/Writer.cpp.

References llvm::Type::LabelTy, Ty, and llvm::Type::VoidTy.


Variable Documentation

const unsigned BCVersionNum = 5

The bytecode version number.

This value needs to be incremented every time the bytecode format changes so that the reader can distinguish which format of the bytecode file has been written.

Definition at line 43 of file Bytecode/Writer/Writer.cpp.

Referenced by llvm::BytecodeWriter::BytecodeWriter().

Statistic BytesWritten("bytecodewriter","Number of bytecode bytes written") [static]

Referenced by llvm::WriteBytecodeToFile().

RegisterPass<WriteBytecodePass> X("emitbytecode","Bytecode Writer") [static]