LLVM  8.0.1
Typedefs | Functions | Variables
ExternalFunctions.cpp File Reference
#include "Interpreter.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/Config/config.h"
#include "llvm/ExecutionEngine/GenericValue.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Type.h"
#include "llvm/Support/Casting.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 "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cmath>
#include <csignal>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <map>
#include <string>
#include <utility>
#include <vector>
Include dependency graph for ExternalFunctions.cpp:

Go to the source code of this file.

Typedefs

typedef GenericValue(* ExFunc) (FunctionType *, ArrayRef< GenericValue >)
 

Functions

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

Variables

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

Typedef Documentation

◆ ExFunc

typedef GenericValue(* ExFunc) (FunctionType *, ArrayRef< GenericValue >)

Definition at line 63 of file ExternalFunctions.cpp.

Function Documentation

◆ getTypeID()

static char getTypeID ( Type Ty)
static

◆ lle_X_abort()

static GenericValue lle_X_abort ( FunctionType FT,
ArrayRef< GenericValue Args 
)
static

Definition at line 327 of file ExternalFunctions.cpp.

Referenced by lle_X_memcpy().

◆ lle_X_atexit()

static GenericValue lle_X_atexit ( FunctionType FT,
ArrayRef< GenericValue Args 
)
static

◆ lle_X_exit()

static GenericValue lle_X_exit ( FunctionType FT,
ArrayRef< GenericValue Args 
)
static

Definition at line 321 of file ExternalFunctions.cpp.

References llvm::Interpreter::exitCalled().

Referenced by lle_X_memcpy().

◆ lle_X_fprintf()

static GenericValue lle_X_fprintf ( FunctionType FT,
ArrayRef< GenericValue Args 
)
static

◆ lle_X_memcpy()

static GenericValue lle_X_memcpy ( FunctionType FT,
ArrayRef< GenericValue Args 
)
static

◆ lle_X_memset()

static GenericValue lle_X_memset ( FunctionType FT,
ArrayRef< GenericValue Args 
)
static

◆ lle_X_printf()

static GenericValue lle_X_printf ( FunctionType FT,
ArrayRef< GenericValue Args 
)
static

◆ lle_X_scanf()

static GenericValue lle_X_scanf ( FunctionType FT,
ArrayRef< GenericValue args 
)
static

◆ lle_X_sprintf()

static GenericValue lle_X_sprintf ( FunctionType FT,
ArrayRef< GenericValue Args 
)
static

◆ lle_X_sscanf()

static GenericValue lle_X_sscanf ( FunctionType FT,
ArrayRef< GenericValue args 
)
static

◆ lookupFunction()

static ExFunc lookupFunction ( const Function F)
static

Variable Documentation

◆ ExportedFunctions

ManagedStatic<std::map<const Function *, ExFunc> > ExportedFunctions
static

Definition at line 64 of file ExternalFunctions.cpp.

◆ FuncNames

ManagedStatic<std::map<std::string, ExFunc> > FuncNames
static

Definition at line 65 of file ExternalFunctions.cpp.

◆ FunctionsLock

ManagedStatic<sys::Mutex> FunctionsLock
static

Definition at line 61 of file ExternalFunctions.cpp.

◆ TheInterpreter

Interpreter* TheInterpreter
static

Definition at line 72 of file ExternalFunctions.cpp.