diff options
author | Jay Foad <jay.foad@gmail.com> | 2011-06-20 14:12:33 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2011-06-20 14:12:33 +0000 |
commit | 691c05bb29d3e2ec9c2ed6b1c082ce5d484b75da (patch) | |
tree | 5f6500ab6343f4316365cd6795fcd2044c9ba0f6 /lib/VMCore/Use.cpp | |
parent | 689c24768bce1a3bf33b47559e9398525d11142d (diff) |
Remove the AugmentedUse struct.
I don't think the AugmentedUse struct buys us much, either in
correctness or in ease of use. Ditch it, and simplify Use::getUser() and
User::allocHungoffUses().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133433 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Use.cpp')
-rw-r--r-- | lib/VMCore/Use.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/VMCore/Use.cpp b/lib/VMCore/Use.cpp index 2258b8d985..359a1517ab 100644 --- a/lib/VMCore/Use.cpp +++ b/lib/VMCore/Use.cpp @@ -135,11 +135,9 @@ void Use::zap(Use *Start, const Use *Stop, bool del) { User *Use::getUser() const { const Use *End = getImpliedUser(); - const PointerIntPair<User*, 1, unsigned>& - ref(static_cast<const AugmentedUse*>(End - 1)->ref); - User *She = ref.getPointer(); - return ref.getInt() - ? She + const UserRef *ref = reinterpret_cast<const UserRef*>(End); + return ref->getInt() + ? ref->getPointer() : (User*)End; } |