Static Value-Flow Analysis
|
Namespaces | |
ctir | |
Classes | |
struct | DemangledName |
bool SVF::cppUtil::classTyHasVTable | ( | const StructType * | ty | ) |
Definition at line 569 of file CppUtil.cpp.
const Type * SVF::cppUtil::cppClsNameToType | ( | const std::string & | className | ) |
Definition at line 937 of file CppUtil.cpp.
struct cppUtil::DemangledName SVF::cppUtil::demangle | ( | const std::string & | name | ) |
Definition at line 146 of file CppUtil.cpp.
std::string SVF::cppUtil::extractClsNameFromDynCast | ( | const CallBase * | callBase | ) |
extract class name from cpp dyncast function
extract class name from cpp dyncast function
callBase |
Definition at line 921 of file CppUtil.cpp.
Set< std::string > SVF::cppUtil::extractClsNamesFromFunc | ( | const Function * | foo | ) |
extract class name from the c++ function name, e.g., constructor/destructors
extract class name from the c++ function name, e.g., constructor/destructors
foo |
Definition at line 706 of file CppUtil.cpp.
Set< std::string > SVF::cppUtil::extractClsNamesFromTemplate | ( | const std::string & | oname | ) |
extract class names from template functions
extract class names from template functions
oname |
Definition at line 821 of file CppUtil.cpp.
std::string SVF::cppUtil::getBeforeBrackets | ( | const std::string & | name | ) |
get class name before brackets e.g., for ‘namespace::A<...::...>::f’, we get ‘namespace::A’
Definition at line 127 of file CppUtil.cpp.
std::string SVF::cppUtil::getClassNameFromType | ( | const StructType * | ty | ) |
Definition at line 583 of file CppUtil.cpp.
std::string SVF::cppUtil::getClassNameFromVtblObj | ( | const std::string & | vtblName | ) |
Definition at line 304 of file CppUtil.cpp.
Set< std::string > SVF::cppUtil::getClassNameOfThisPtr | ( | const CallBase * | cs | ) |
Definition at line 601 of file CppUtil.cpp.
Set< std::string > SVF::cppUtil::getClsNamesInBrackets | ( | const std::string & | name | ) |
Definition at line 242 of file CppUtil.cpp.
Definition at line 461 of file CppUtil.cpp.
std::string SVF::cppUtil::getFunNameOfVCallSite | ( | const CallBase * | cs | ) |
Definition at line 635 of file CppUtil.cpp.
Definition at line 389 of file CppUtil.cpp.
Definition at line 646 of file CppUtil.cpp.
Definition at line 411 of file CppUtil.cpp.
Definition at line 537 of file CppUtil.cpp.
const ConstantStruct * SVF::cppUtil::getVtblStruct | ( | const GlobalValue * | vtbl | ) |
Definition at line 323 of file CppUtil.cpp.
bool SVF::cppUtil::isClsNameSource | ( | const Value * | val | ) |
class sources can be heap allocation or functions where we can extract the class name (constructors/destructors or template functions)
class sources are functions where we can extract the class name (constructors/destructors or template functions)
val |
Definition at line 861 of file CppUtil.cpp.
bool SVF::cppUtil::isConstructor | ( | const Function * | F | ) |
TODO: on mac os function name is an empty string after demangling
Definition at line 489 of file CppUtil.cpp.
bool SVF::cppUtil::isCPPThunkFunction | ( | const Function * | F | ) |
Definition at line 383 of file CppUtil.cpp.
bool SVF::cppUtil::isDestructor | ( | const Function * | F | ) |
Definition at line 509 of file CppUtil.cpp.
bool SVF::cppUtil::isDynCast | ( | const Function * | foo | ) |
whether foo is a cpp dyncast function
whether foo is a cpp dyncast function
foo |
Definition at line 910 of file CppUtil.cpp.
Given a inheritance relation B is a child of A We assume B::B(thisPtr1){ A::A(thisPtr2) } such that thisPtr1 == thisPtr2 In the following code thisPtr1 is "%class.B1* %this" and thisPtr2 is "%class.A* %0".
define linkonce_odr dso_local void @B1::B1()(class.B1* this) unnamed_addr #6 comdat this.addr = alloca class.B1*, align 8 store class.B1* this, class.B1** this.addr, align 8 this1 = load class.B1*, class.B1** this.addr, align 8 %0 = bitcast class.B1* this1 to class.A* call void @A::A()(class.A* %0)
Definition at line 437 of file CppUtil.cpp.
bool SVF::cppUtil::isTemplateFunc | ( | const Function * | foo | ) |
whether foo is a cpp template function
whether foo is a cpp template function TODO: we only consider limited label for now (see the very beginning of CppUtil.cpp)
foo |
Definition at line 894 of file CppUtil.cpp.
bool SVF::cppUtil::isValVtbl | ( | const Value * | val | ) |
Definition at line 336 of file CppUtil.cpp.
bool SVF::cppUtil::isVirtualCallSite | ( | const CallBase * | cs | ) |
Definition at line 352 of file CppUtil.cpp.
bool SVF::cppUtil::matchesLabel | ( | const std::string & | foo, |
const std::string & | label | ||
) |
whether foo matches the mangler label
whether fooName matches the mangler label
foo | |
label |
Definition at line 883 of file CppUtil.cpp.
bool SVF::cppUtil::VCallInCtorOrDtor | ( | const CallBase * | cs | ) |
Definition at line 553 of file CppUtil.cpp.