33#include "Util/config.h"
83 return "popen failed!";
102 if (
path.compare(
"SVF_DIR") == 0)
111 else if (
path.compare(
"npm root") == 0)
130 return std::string(
info.dli_fname);
209 SVFUtil::errs() <<
"ERROR: Failed to locate \"extapi.bc\". Tried the following candidate paths:" << std::endl;
214 SVFUtil::errs() <<
"To override the default locations for \"extapi.bc\", you can:" << std::endl
215 <<
"\t1. Use the command line argument \"-extapi=path/to/extapi.bc\"" << std::endl
216 <<
"\t2. Use the \"setExtBcPath()\" function *BEFORE* calling \"buildSVFModule()\"" << std::endl
217 <<
"\t3. Override the paths in \"include/SVF/Util/config.h\" (WARNING: will be overwritten "
218 <<
"when rebuilding SVF (generated by CMakeLists.txt))" << std::endl;
225 assert(fun &&
"Null FunObjVar* pointer");
231 assert(fun &&
"Null FunObjVar* pointer");
245 assert(fun &&
"Null FunObjVar* pointer");
258 assert(fun &&
"Null FunObjVar* pointer");
297 assert(!
allocArg.empty() &&
"Not an alloc call via argument or incorrect extern function annotation!");
305 assert(!
number.empty() &&
"Incorrect naming convention for svf external functions(ALLOC_HEAP_ARG + number)?");
316 assert(F &&
"Null FunObjVar* pointer");
static std::string GetStdoutFromCommand(const std::string &command)
static std::string getFilePath(const std::string &path)
std::string getCurrentSOPath()
const char *const const double number
bool is_alloc_stack_ret(const FunObjVar *F)
bool is_arg_alloc(const FunObjVar *F)
bool is_memcpy(const FunObjVar *F)
std::string getExtBcPath()
static std::string extBcPath
s32_t get_alloc_arg_pos(const FunObjVar *F)
static ExtAPI * getExtAPI()
bool is_ext(const FunObjVar *funObjVar)
std::string getExtFuncAnnotation(const FunObjVar *fun, const std::string &funcAnnotation)
bool is_realloc(const FunObjVar *F)
Map< const FunObjVar *, std::vector< std::string > > funObjVar2Annotations
void setExtFuncAnnotations(const FunObjVar *fun, const std::vector< std::string > &funcAnnotations)
static bool setExtBcPath(const std::string &path)
bool hasExtFuncAnnotation(const FunObjVar *fun, const std::string &funcAnnotation)
bool is_alloc(const FunObjVar *F)
const std::vector< std::string > & getExtFuncAnnotations(const FunObjVar *fun)
bool is_memset(const FunObjVar *F)
bool isDeclaration() const
static const Option< std::string > ExtAPIPath
char * fgets(char *str, int n, void *stream)
char * getenv(const char *name)
std::ostream & errs()
Overwrite llvm::errs()
llvm::IRBuilder IRBuilder