[Bitstream] Add BitCodeAbbrev(std::initializer_list) constructor

llvm-svn: 371128
This commit is contained in:
Jan Korous 2019-09-05 21:26:53 +00:00
parent 4533b4a3a6
commit e9a78e992b
1 changed files with 5 additions and 0 deletions

View File

@ -168,6 +168,11 @@ class BitCodeAbbrev {
SmallVector<BitCodeAbbrevOp, 32> OperandList;
public:
BitCodeAbbrev() = default;
explicit BitCodeAbbrev(std::initializer_list<BitCodeAbbrevOp> OperandList)
: OperandList(OperandList) {}
unsigned getNumOperandInfos() const {
return static_cast<unsigned>(OperandList.size());
}