Skip to content
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

Merged
merged 8 commits into from
Jan 30, 2024
Merged

Opaque #1352

merged 8 commits into from
Jan 30, 2024

Conversation

jumormt
Copy link
Contributor

@jumormt jumormt commented Jan 29, 2024

add support for opaque pointers (tested with LLVM-14 with getptrelement and getpointerto APIs removed).

Copy link

codecov bot commented Jan 29, 2024

Codecov Report

Attention: 21 lines in your changes are missing coverage. Please review.

Comparison is base (ade5d0b) 66.06% compared to head (b252b66) 66.27%.

Additional details and impacted files

Impacted file tree graph

@@            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     
Files Coverage Δ
svf-llvm/include/SVF-LLVM/LLVMUtil.h 73.33% <ø> (-1.67%) ⬇️
svf-llvm/include/SVF-LLVM/ObjTypeInference.h 100.00% <ø> (ø)
svf-llvm/lib/CHGBuilder.cpp 86.33% <100.00%> (+0.25%) ⬆️
svf-llvm/lib/ObjTypeInference.cpp 94.18% <94.35%> (-0.42%) ⬇️
svf-llvm/lib/CppUtil.cpp 86.57% <90.67%> (+4.62%) ⬆️

... and 2 files with indirect coverage changes

@@ -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)
Copy link
Collaborator

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

protected:

/// Backward collect all possible cpp constructors starting from a value
Set<const Value *> findCPPSources(const Value *startValue);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FindCPPConstor?

Copy link
Contributor Author

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.

/// whether fooName matches the mangler label
bool matchManglerLabel(const std::string &fooName, const std::string &label);

/// whether foo is a cpp self-inference function
Copy link
Collaborator

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?

Copy link
Contributor Author

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?

@yuleisui yuleisui merged commit 86dee72 into SVF-tools:master Jan 30, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants