aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/User.cpp
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2015-06-10 22:38:46 +0000
committerPete Cooper <peter_cooper@apple.com>2015-06-10 22:38:46 +0000
commit3fc304086048ffe13a9008cbd510fd8b5c6c0b8b (patch)
treea15f45eb2a406bcde622df93436a71768172533d /llvm/lib/IR/User.cpp
parent93f9ff5781978963f2252ec36d402a1ef23a0500 (diff)
downloadllvm-3fc304086048ffe13a9008cbd510fd8b5c6c0b8b.zip
llvm-3fc304086048ffe13a9008cbd510fd8b5c6c0b8b.tar.gz
llvm-3fc304086048ffe13a9008cbd510fd8b5c6c0b8b.tar.bz2
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. llvm-svn: 239493
Diffstat (limited to 'llvm/lib/IR/User.cpp')
-rw-r--r--llvm/lib/IR/User.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/IR/User.cpp b/llvm/lib/IR/User.cpp
index 8035989..d659352 100644
--- a/llvm/lib/IR/User.cpp
+++ b/llvm/lib/IR/User.cpp
@@ -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) {