This is an archive of the discontinued LLVM Phabricator instance.

Properly handle byval arguments in getPointerDereferenceableBytes()
ClosedPublic

Authored by dotdash on Dec 15 2017, 12:07 PM.

Details

Summary

For byval arguments, the number of dereferenceable bytes is equal to
the size of the pointee, not the pointer.

Diff Detail

Repository
rL LLVM

Event Timeline

dotdash created this revision.Dec 15 2017, 12:07 PM
efriedma added inline comments.
lib/IR/Value.cpp
632 ↗(On Diff #127174)

The verifier checks isSized(); you don't need to check it here.

dotdash updated this revision to Diff 127176.Dec 15 2017, 12:29 PM

Removed the unnecessary isSized() check

dotdash marked an inline comment as done.Dec 15 2017, 12:29 PM
This revision is now accepted and ready to land.Dec 15 2017, 12:36 PM
This revision was automatically updated to reflect the committed changes.