Fix DIExpression::ExprOperand::appendToVector
authorVedant Kumar <vsk@apple.com>
Fri, 6 Jul 2018 21:06:21 +0000 (21:06 +0000)
committerVedant Kumar <vsk@apple.com>
Fri, 6 Jul 2018 21:06:21 +0000 (21:06 +0000)
commit71c7c43695f33b763b4a5c56b2c960dc4b28007c
treeb1216197189574b2f98094d1ea432c603f235223
parent8a3680852e41a10d96fe301b29c856fb63904eda
Fix DIExpression::ExprOperand::appendToVector

appendToVector used the wrong overload of SmallVector::append, resulting
in it appending the same element to a vector `getSize()` times. This did
not cause a problem when initially committed because appendToVector was
only used to append 1-element operands.

This changes appendToVector to use the correct overload of append().

Testing: ./unittests/IR/IRTests --gtest_filter='*DIExpressionTest*'
llvm-svn: 336466
llvm/include/llvm/IR/DebugInfoMetadata.h
llvm/lib/IR/DebugInfoMetadata.cpp