[PATCH] D33627: Fix Crashes when 'AttributeList::get'ing with an ArrayRef<AttributeList> where all pImpl are null

Nicholas Wilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 30 03:52:58 PDT 2017


thewilsonator added a comment.

Thanks.

I just pasted the diff from my terminal and it accepted it with whatever the default of `git diff` is, I don't know what U9999 is. *shrug*
This is my first contribution to LLVM so I don't know the way things are supposed to work.

The `AttributeList::get` that takes an `ArrayRef<AttributeList>` checks for `Attrs.empty()` and for `Attrs.size() == 1` as fast paths.
the `getImpl` asserts that the `ArrayRef<AttributeSet>` is not empty but I must have had asserts disabled.

Nicholas


Repository:
  rL LLVM

https://reviews.llvm.org/D33627





More information about the llvm-commits mailing list