LLVM API Documentation

ReaderWrappers.cpp File Reference

#include "llvm/Bytecode/Analyzer.h"
#include "llvm/Bytecode/Reader.h"
#include "Reader.h"
#include "llvm/Module.h"
#include "llvm/Instructions.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/System/MappedFile.h"
#include "llvm/System/Program.h"
#include <cerrno>
#include <iostream>
#include <memory>

Include dependency graph for ReaderWrappers.cpp:

Go to the source code of this file.

Functions

static ModuleProviderCheckVarargs (ModuleProvider *MP)
ModuleProviderllvm::getBytecodeBufferModuleProvider (const unsigned char *Buffer, unsigned Length, const std::string &ModuleID, BytecodeHandler *H)
Modulellvm::ParseBytecodeBuffer (const unsigned char *Buffer, unsigned Length, const std::string &ModuleID, std::string *ErrorStr)
 Parse a given bytecode buffer.
ModuleProviderllvm::getBytecodeModuleProvider (const std::string &Filename, BytecodeHandler *H)
Modulellvm::ParseBytecodeFile (const std::string &Filename, std::string *ErrorStr)
 Parse the given bytecode file.
Modulellvm::AnalyzeBytecodeFile (const std::string &Filename, BytecodeAnalysis &bca, std::string *ErrorStr, std::ostream *output)
 Analyze contents of a bytecode File.
Modulellvm::AnalyzeBytecodeBuffer (const unsigned char *Buffer, unsigned Length, const std::string &ModuleID, BytecodeAnalysis &bca, std::string *ErrorStr, std::ostream *output)
 Analyze contents of a bytecode buffer.
bool llvm::GetBytecodeDependentLibraries (const std::string &fname, Module::LibraryListType &deplibs)
 Get the list of dependent libraries from a bytecode file.
static void getSymbols (Module *M, std::vector< std::string > &symbols)
bool llvm::GetBytecodeSymbols (const sys::Path &fName, std::vector< std::string > &symbols)
 Get a bytecode file's externally visibile defined global symbols.
ModuleProviderllvm::GetBytecodeSymbols (const unsigned char *Buffer, unsigned Length, const std::string &ModuleID, std::vector< std::string > &symbols)
 Get a bytecode file's externally visibile defined global symbols.


Function Documentation

static ModuleProvider* CheckVarargs ( ModuleProvider MP  )  [static]

Definition at line 161 of file ReaderWrappers.cpp.

References E, F, llvm::ModuleProvider::getModule(), llvm::Module::getNamedFunction(), llvm::Module::getOrInsertFunction(), M, llvm::ModuleProvider::materializeModule(), and RetTy.

Referenced by llvm::getBytecodeBufferModuleProvider(), and llvm::getBytecodeModuleProvider().

static void getSymbols ( Module M,
std::vector< std::string > &  symbols 
) [static]

Definition at line 363 of file ReaderWrappers.cpp.

References llvm::Module::begin(), llvm::Module::end(), GI, llvm::Module::global_begin(), llvm::Module::global_end(), and M.

Referenced by llvm::GetBytecodeSymbols().


Variable Documentation

const unsigned char* Buffer

Definition at line 67 of file ReaderWrappers.cpp.

Referenced by llvm::ftostr(), llvm::ParseException::getMessage(), isFPCSafeToPrint(), lle_X_fprintf(), lle_X_printf(), lle_X_sprintf(), llvm::utohexstr(), llvm::utostr(), llvm::utostr_32(), and llvm::WriteBytecodeToFile().

unsigned char* FileBuf

Definition at line 123 of file ReaderWrappers.cpp.

std::vector<unsigned char> FileData

Definition at line 122 of file ReaderWrappers.cpp.

sys::MappedFile mapFile

Definition at line 38 of file ReaderWrappers.cpp.

bool MustDelete

Definition at line 68 of file ReaderWrappers.cpp.