Use LocationSize::upperBound instead of precise since we only know an upper bound on the number of bytes read/written.
Details
Details
Diff Detail
Diff Detail
Event Timeline
llvm/lib/Analysis/MemoryLocation.cpp | ||
---|---|---|
261 | I think it might be slightly better to mention here that we only know an upper bound on the number of bytes written and this upper bound is unsafe to use for writes. |
llvm/lib/Analysis/MemoryLocation.cpp | ||
---|---|---|
261 | Ok, I will change the comment. There is a LocationSize::upperBound(..), maybe it should be possible to use it here? |
llvm/lib/Analysis/MemoryLocation.cpp | ||
---|---|---|
261 | Yes, it would probably be best to use upperBound unconditionally here for both read and write. |
I think it might be slightly better to mention here that we only know an upper bound on the number of bytes written and this upper bound is unsafe to use for writes.