[PATCH] D122130: Verify parameter alignment attribute
Phoebe Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 21 06:08:59 PDT 2022
pengfei added inline comments.
================
Comment at: llvm/lib/IR/Verifier.cpp:1827
if (Attrs.hasAttribute(Attribute::ByVal)) {
SmallPtrSet<Type *, 4> Visited;
Assert(Attrs.getByValType()->isSized(&Visited),
----------------
I think we can put the check inside here:
```
if (Attrs.hasAttribute(Attribute::ByVal)) {
if (Attrs.hasAttribute(Attribute::Alignment)) {
...
}
SmallPtrSet<Type *, 4> Visited;
```
================
Comment at: llvm/lib/IR/Verifier.cpp:1831
}
if (Attrs.hasAttribute(Attribute::ByRef)) {
SmallPtrSet<Type *, 4> Visited;
----------------
Do we need check for `ByRef`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122130/new/
https://reviews.llvm.org/D122130
More information about the llvm-commits
mailing list