summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/User.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2011-06-21 02:09:03 +0000
committerChad Rosier <mcrosier@apple.com>2011-06-21 02:09:03 +0000
commit184f3b37e2a6812c647c2614613a9eebfe33247b (patch)
treec716044e0e18ef2e5a91d6daa7286896d80d38b5 /llvm/lib/VMCore/User.cpp
parentfe356d356ad411306d360da58c9b5fef1175fc95 (diff)
downloadbcm5719-llvm-184f3b37e2a6812c647c2614613a9eebfe33247b.tar.gz
bcm5719-llvm-184f3b37e2a6812c647c2614613a9eebfe33247b.zip
Revert r133435 and r133449 to appease buildbots.
llvm-svn: 133499
Diffstat (limited to 'llvm/lib/VMCore/User.cpp')
-rw-r--r--llvm/lib/VMCore/User.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/VMCore/User.cpp b/llvm/lib/VMCore/User.cpp
index f01fa349adf..9601da7011e 100644
--- a/llvm/lib/VMCore/User.cpp
+++ b/llvm/lib/VMCore/User.cpp
@@ -40,10 +40,8 @@ void User::replaceUsesOfWith(Value *From, Value *To) {
//===----------------------------------------------------------------------===//
Use *User::allocHungoffUses(unsigned N) const {
- // 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);
- Use *Begin = static_cast<Use*>(::operator new(size));
+ Use *Begin = static_cast<Use*>(::operator new(sizeof(Use) * N
+ + sizeof(Use::UserRef)));
Use *End = Begin + N;
(void) new(End) Use::UserRef(const_cast<User*>(this), 1);
return Use::initTags(Begin, End);
OpenPOWER on IntegriCloud