-
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
fix getByteOffsets in GepStmt and SVFIR2ItvExeState #1240
Conversation
bjjwwang
commented
Nov 7, 2023
- add getLLVMByteSize in SVFType
- fix getByteOffset in SVFIR2ExeState and GepStmt
svf/lib/SVFIR/SVFType.cpp
Outdated
@@ -4,6 +4,11 @@ | |||
namespace SVF | |||
{ | |||
|
|||
__attribute__((weak)) | |||
u32_t SVFType::getLLVMByteSize() const { | |||
return 0; |
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.
Put an assertion to mention implementation and add an abort() method. See SVFValue::toString()
/// e.g. GepStmt* gep = [i32*4]*, 2 | ||
/// APOffset byteOffset = gep->accumulateConstantByteOffset(); | ||
/// byteOffset should be 8 since i32 is 4 bytes and index is 2. | ||
APOffset computeConstantByteOffset() const; |
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.
Need to explain a bit more about this method since the argument has been removed.
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 guess the argument is no longer needed.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #1240 +/- ##
==========================================
- Coverage 64.49% 64.48% -0.02%
==========================================
Files 223 223
Lines 23669 23674 +5
==========================================
Hits 15266 15266
- Misses 8403 8408 +5
|