aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/User.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VMCore/User.cpp')
-rw-r--r--lib/VMCore/User.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/VMCore/User.cpp b/lib/VMCore/User.cpp
index 2f4587debb..9601da7011 100644
--- a/lib/VMCore/User.cpp
+++ b/lib/VMCore/User.cpp
@@ -41,13 +41,9 @@ void User::replaceUsesOfWith(Value *From, Value *To) {
Use *User::allocHungoffUses(unsigned N) const {
Use *Begin = static_cast<Use*>(::operator new(sizeof(Use) * N
- + sizeof(AugmentedUse)
- - sizeof(Use)));
+ + sizeof(Use::UserRef)));
Use *End = Begin + N;
- PointerIntPair<User*, 1, unsigned>&
- ref(static_cast<AugmentedUse&>(End[-1]).ref);
- ref.setPointer(const_cast<User*>(this));
- ref.setInt(1);
+ (void) new(End) Use::UserRef(const_cast<User*>(this), 1);
return Use::initTags(Begin, End);
}