diff --git a/include/llvm/Use.h b/include/llvm/Use.h index 7d6bf5027bc..a2774c802ff 100644 --- a/include/llvm/Use.h +++ b/include/llvm/Use.h @@ -98,7 +98,7 @@ private: Value *Val; Use *Next; - PointerIntPair Prev; + PointerIntPair Prev; void setPrev(Use **NewPrev) { Prev.setPointer(NewPrev); diff --git a/lib/VMCore/Use.cpp b/lib/VMCore/Use.cpp index da21eba132a..c44c17f55e5 100644 --- a/lib/VMCore/Use.cpp +++ b/lib/VMCore/Use.cpp @@ -138,11 +138,11 @@ struct AugmentedUse : Use { User *Use::getUser() const { const Use *End = getImpliedUser(); - PointerIntPair& ref(static_cast(End - 1)->ref); + PointerIntPair& ref(static_cast(End - 1)->ref); User *She = ref.getPointer(); return ref.getInt() - ? She - : (User*)End; + ? She + : (User*)End; } //===----------------------------------------------------------------------===// @@ -154,7 +154,7 @@ Use *User::allocHungoffUses(unsigned N) const { + sizeof(AugmentedUse) - sizeof(Use))); Use *End = Begin + N; - PointerIntPair& ref(static_cast(End[-1]).ref); + PointerIntPair& ref(static_cast(End[-1]).ref); ref.setPointer(const_cast(this)); ref.setInt(tagOne); return Use::initTags(Begin, End);