svf-lib 1.0.1031 → 1.0.1032
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
Binary file
|
|
Binary file
|
|
@@ -104,6 +104,16 @@ inline bool isHeapAllocExtFunViaArg(const SVFFunction* fun)
|
|
|
104
104
|
return fun && ExtAPI::getExtAPI()->is_arg_alloc(fun);
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
+
static inline Type *getPtrElementType(const PointerType* pty)
|
|
108
|
+
{
|
|
109
|
+
#if (LLVM_VERSION_MAJOR < 14)
|
|
110
|
+
return pty->getElementType();
|
|
111
|
+
#else
|
|
112
|
+
assert(!pty->isOpaque() && "Opaque Pointer is used, please recompile the source adding '-Xclang -no-opaque-pointer'");
|
|
113
|
+
return pty->getNonOpaquePointerElementType();
|
|
114
|
+
#endif
|
|
115
|
+
}
|
|
116
|
+
|
|
107
117
|
/// interfaces to be used externally
|
|
108
118
|
inline bool isHeapAllocExtCallViaRet(const CallSite cs)
|
|
109
119
|
{
|
|
@@ -248,7 +258,7 @@ inline const PointerType *getRefTypeOfHeapAllocOrStatic(const CallSite cs)
|
|
|
248
258
|
int argPos = getHeapAllocHoldingArgPosition(cs);
|
|
249
259
|
const Value *arg = cs.getArgument(argPos);
|
|
250
260
|
if (const PointerType *argType = SVFUtil::dyn_cast<PointerType>(arg->getType()))
|
|
251
|
-
refType = SVFUtil::dyn_cast<PointerType>(argType
|
|
261
|
+
refType = SVFUtil::dyn_cast<PointerType>(getPtrElementType(argType));
|
|
252
262
|
}
|
|
253
263
|
// Case 2: heap/static object held by return value.
|
|
254
264
|
else
|
|
@@ -51,6 +51,10 @@
|
|
|
51
51
|
#include <llvm/ADT/GraphTraits.h> // for Graphtraits
|
|
52
52
|
#include <llvm/Transforms/Utils/Local.h> // for FindDbgAddrUses
|
|
53
53
|
|
|
54
|
+
#if (LLVM_VERSION_MAJOR >= 14)
|
|
55
|
+
#include <llvm/BinaryFormat/Dwarf.h>
|
|
56
|
+
#endif
|
|
57
|
+
|
|
54
58
|
#include "llvm/Analysis/LoopInfo.h"
|
|
55
59
|
#include "llvm/IR/CFG.h"
|
|
56
60
|
#include "llvm/BinaryFormat/Dwarf.h"
|