summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/User.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-06-23 06:24:52 +0000
committerEric Christopher <echristo@apple.com>2011-06-23 06:24:52 +0000
commit96513120b73821726d0e33f2a64afbe464cd8b74 (patch)
treebb51f3ebc9ee79cd1dfc742611d26577244684cc /llvm/lib/VMCore/User.cpp
parentb0d8199925611f010f87a5c1450d054b4ab9293e (diff)
downloadbcm5719-llvm-96513120b73821726d0e33f2a64afbe464cd8b74.tar.gz
bcm5719-llvm-96513120b73821726d0e33f2a64afbe464cd8b74.zip
Revert r133513:
"Reinstate r133435 and r133449 (reverted in r133499) now that the clang self-hosted build failure has been fixed (r133512)." Due to some additional warnings. llvm-svn: 133700
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