Stop returning a Use* from allocHungOffUses.

This always just set the User::OperandList which is now set
in that method instead of being returned.

Reviewed by Duncan Exon Smith.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239493 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Pete Cooper
2015-06-10 22:38:46 +00:00
parent 33102d2faa
commit ea423677ca
4 changed files with 21 additions and 22 deletions

View File

@ -40,7 +40,7 @@ void User::replaceUsesOfWith(Value *From, Value *To) {
// User allocHungoffUses Implementation
//===----------------------------------------------------------------------===//
Use *User::allocHungoffUses(unsigned N, bool IsPhi) {
void User::allocHungoffUses(unsigned N, bool IsPhi) {
// Allocate the array of Uses, followed by a pointer (with bottom bit set) to
// the User.
size_t size = N * sizeof(Use) + sizeof(Use::UserRef);
@ -49,11 +49,9 @@ Use *User::allocHungoffUses(unsigned N, bool IsPhi) {
Use *Begin = static_cast<Use*>(::operator new(size));
Use *End = Begin + N;
(void) new(End) Use::UserRef(const_cast<User*>(this), 1);
Use *Uses = Use::initTags(Begin, End);
OperandList = Uses;
OperandList = Use::initTags(Begin, End);
// Tag this operand list as being a hung off.
HasHungOffUses = true;
return Uses;
}
void User::growHungoffUses(unsigned NewNumUses, bool IsPhi) {