Verifying opaque pointer as function parameter when using with byval, byref,
inalloca, preallocated.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
can you add some negative tests for this? e.g. make sure you see the proper message for something like
call void @f(ptr inalloca(%somenotsizedtype) %a)
there are some negative verifier tests in llvm/test/Verifier, search RUN: not opt
llvm/lib/IR/Verifier.cpp | ||
---|---|---|
1860 | we still need a Visited in the new code to account for recursive types we can delete the checks below for isSized() and always use your new code, then only check that the pointee type and inalloca/etc type match for non-opaque pointers |
llvm/lib/IR/Verifier.cpp | ||
---|---|---|
1869 | we still should keep this check that for non-opaque pointers, the element type matches the attribute type, I only meant to make the check for sized common between opaque and non-opaque pointers (and we should keep all the tests that were deleted) |
we still need a Visited in the new code to account for recursive types
we can delete the checks below for isSized() and always use your new code, then only check that the pointee type and inalloca/etc type match for non-opaque pointers