Fix memory issue in AttrBuilder::removeAttribute uses.
authorBjorn Pettersson <bjorn.a.pettersson@ericsson.com>
Thu, 27 Oct 2016 14:48:09 +0000 (14:48 +0000)
committerBjorn Pettersson <bjorn.a.pettersson@ericsson.com>
Thu, 27 Oct 2016 14:48:09 +0000 (14:48 +0000)
commit807f732ce84dd2f4f253ae4bda4b8a49ef79906a
tree5a7e845cf040511bd16c00ae083dacbd7f702915
parent046da74699f53fc0c81e5c02c38038adb3a86c56
Fix memory issue in AttrBuilder::removeAttribute uses.

Summary:
Found when running Valgrind.

This removes two unnecessary assignments when using
AttrBuilder::removeAttribute.

AttrBuilder::removeAttribute returns a reference to the object.
As the LHSes were the same as the callees, the assignments
resulted in memcpy calls where dst = src.

Commited on behalf-of: dstenb (David Stenberg)

Reviewers: mkuper, rnk

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25460

llvm-svn: 285298
llvm/lib/CodeGen/Analysis.cpp