Static Value-Flow Analysis
Loading...
Searching...
No Matches
AbsExtAPI.cpp File Reference

Go to the source code of this file.

Macros

#define SSE_FUNC_PROCESS(LLVM_NAME, FUNC_NAME)

Macro Definition Documentation

◆ SSE_FUNC_PROCESS

#define SSE_FUNC_PROCESS ( LLVM_NAME,
FUNC_NAME )
Value:
auto sse_##FUNC_NAME = [this](const CallICFGNode *callNode) { \
/* run real ext function */ \
assert(callNode->arg_size() >= 1 && "external function expects one argument"); \
const SVFVar* argVar = callNode->getArgument(0); \
const AbstractValue& argVal = ae->getAbsValue(argVar, callNode); \
if (argVal.isInterval() && argVal.getInterval().is_numeral()) { \
u32_t rhs = argVal.getInterval().lb().getIntNumeral(); \
result = IntervalValue(FUNC_NAME(rhs)); \
} \
const SVFVar* retVar = callNode->getRetICFGNode()->getActualRet(); \
ae->updateAbsValue(retVar, result, callNode); \
}; \
func_map[#FUNC_NAME] = sse_##FUNC_NAME;
unsigned u32_t
Definition CommandLine.h:18
bool isInterval() const
IntervalValue & getInterval()
s64_t getIntNumeral() const
bool is_numeral() const
Return true if the IntervalValue is a number [num, num].
static IntervalValue top()
Create the IntervalValue [-inf, +inf].
const BoundedInt & lb() const
Return the lower bound.