LLVM API Documentation

Typedefs | Functions | Variables
ExternalFunctions.cpp File Reference
#include "Interpreter.h"
#include "llvm/Config/config.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/DynamicLibrary.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/Mutex.h"
#include "llvm/Support/UniqueLock.h"
#include <cmath>
#include <csignal>
#include <cstdio>
#include <cstring>
#include <map>
Include dependency graph for ExternalFunctions.cpp:

Go to the source code of this file.

Typedefs

typedef GenericValue(* ExFunc )(FunctionType *, const std::vector< GenericValue > &)

Functions

static char getTypeID (Type *Ty)
static ExFunc lookupFunction (const Function *F)
static GenericValue lle_X_atexit (FunctionType *FT, const std::vector< GenericValue > &Args)
static GenericValue lle_X_exit (FunctionType *FT, const std::vector< GenericValue > &Args)
static GenericValue lle_X_abort (FunctionType *FT, const std::vector< GenericValue > &Args)
static GenericValue lle_X_sprintf (FunctionType *FT, const std::vector< GenericValue > &Args)
static GenericValue lle_X_printf (FunctionType *FT, const std::vector< GenericValue > &Args)
static GenericValue lle_X_sscanf (FunctionType *FT, const std::vector< GenericValue > &args)
static GenericValue lle_X_scanf (FunctionType *FT, const std::vector< GenericValue > &args)
static GenericValue lle_X_fprintf (FunctionType *FT, const std::vector< GenericValue > &Args)
static GenericValue lle_X_memset (FunctionType *FT, const std::vector< GenericValue > &Args)
static GenericValue lle_X_memcpy (FunctionType *FT, const std::vector< GenericValue > &Args)

Variables

static ManagedStatic< sys::MutexFunctionsLock
static ManagedStatic< std::map
< const Function *, ExFunc > > 
ExportedFunctions
static std::map< std::string,
ExFunc
FuncNames
static InterpreterTheInterpreter

Typedef Documentation

typedef GenericValue(* ExFunc)(FunctionType *, const std::vector< GenericValue > &)

Definition at line 52 of file ExternalFunctions.cpp.


Function Documentation

static char getTypeID ( Type Ty) [static]
static GenericValue lle_X_abort ( FunctionType FT,
const std::vector< GenericValue > &  Args 
) [static]

Definition at line 322 of file ExternalFunctions.cpp.

static GenericValue lle_X_atexit ( FunctionType FT,
const std::vector< GenericValue > &  Args 
) [static]
static GenericValue lle_X_exit ( FunctionType FT,
const std::vector< GenericValue > &  Args 
) [static]

Definition at line 314 of file ExternalFunctions.cpp.

References llvm::Interpreter::exitCalled(), and TheInterpreter.

static GenericValue lle_X_fprintf ( FunctionType FT,
const std::vector< GenericValue > &  Args 
) [static]
static GenericValue lle_X_memcpy ( FunctionType FT,
const std::vector< GenericValue > &  Args 
) [static]
static GenericValue lle_X_memset ( FunctionType FT,
const std::vector< GenericValue > &  Args 
) [static]
static GenericValue lle_X_printf ( FunctionType FT,
const std::vector< GenericValue > &  Args 
) [static]

Definition at line 416 of file ExternalFunctions.cpp.

References lle_X_sprintf(), llvm::outs(), and llvm::PTOGV().

static GenericValue lle_X_scanf ( FunctionType FT,
const std::vector< GenericValue > &  args 
) [static]
static GenericValue lle_X_sprintf ( FunctionType FT,
const std::vector< GenericValue > &  Args 
) [static]
static GenericValue lle_X_sscanf ( FunctionType FT,
const std::vector< GenericValue > &  args 
) [static]
static ExFunc lookupFunction ( const Function F) [static]

Variable Documentation

std::map<std::string, ExFunc> FuncNames [static]

Definition at line 55 of file ExternalFunctions.cpp.

Referenced by lookupFunction().