-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Opaque #1352
Opaque #1352
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1352 +/- ##
==========================================
+ Coverage 66.06% 66.27% +0.21%
==========================================
Files 227 227
Lines 24452 24638 +186
==========================================
+ Hits 16153 16328 +175
- Misses 8299 8310 +11
|
@@ -100,9 +100,11 @@ static inline Type* getPtrElementType(const PointerType* pty) | |||
{ | |||
#if (LLVM_VERSION_MAJOR < 14) | |||
return pty->getPointerElementType(); | |||
#else | |||
#elif (LLVM_VERSION_MAJOR < 17) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember it is version 16?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
16 still supports typed pointers (https://llvm.org/docs/OpaquePointers.html#version-support)
protected: | ||
|
||
/// Backward collect all possible cpp constructors starting from a value | ||
Set<const Value *> findCPPSources(const Value *startValue); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FindCPPConstor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for the confusion, sources can be heap allocation or self-inference functions (constructors/destructors or template functions). I've updated the comments.
svf-llvm/include/SVF-LLVM/CppUtil.h
Outdated
/// whether fooName matches the mangler label | ||
bool matchManglerLabel(const std::string &fooName, const std::string &label); | ||
|
||
/// whether foo is a cpp self-inference function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this mean? Can be self-inferred?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
functions that we can get the class name from the function name, like constructors (e.g., A::A()), template functions (e.g., std::deque<A const*, std::allocator<A const*> >). Any suggestions on better naming?
add support for opaque pointers (tested with LLVM-14 with getptrelement and getpointerto APIs removed).