diff options
author | Gabor Greif <ggreif@gmail.com> | 2008-09-19 15:03:57 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2008-09-19 15:03:57 +0000 |
commit | a7e3013a8ed559b17367e82788a1c52c13ee134d (patch) | |
tree | b167f6bf294bfe2c01fde421dc8ea5a871c3f78e /lib/VMCore/Value.cpp | |
parent | e8c0ca5bb4b8af1dedb50f4b1778b8fe1cc19486 (diff) | |
download | external_llvm-a7e3013a8ed559b17367e82788a1c52c13ee134d.zip external_llvm-a7e3013a8ed559b17367e82788a1c52c13ee134d.tar.gz external_llvm-a7e3013a8ed559b17367e82788a1c52c13ee134d.tar.bz2 |
first shot at removing Use::Val
untested, Use::swap() is definitely not done yet
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56348 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Value.cpp')
-rw-r--r-- | lib/VMCore/Value.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VMCore/Value.cpp b/lib/VMCore/Value.cpp index bc5b7a9..a5e0ff3 100644 --- a/lib/VMCore/Value.cpp +++ b/lib/VMCore/Value.cpp @@ -34,7 +34,7 @@ static inline const Type *checkType(const Type *Ty) { Value::Value(const Type *ty, unsigned scid) : SubclassID(scid), SubclassData(0), VTy(checkType(ty)), - UseList(0), Name(0) { + UseList(Use::nilUse(this)), Name(0) { if (isa<CallInst>(this) || isa<InvokeInst>(this)) assert((VTy->isFirstClassType() || VTy == Type::VoidTy || isa<OpaqueType>(ty) || VTy->getTypeID() == Type::StructTyID) && @@ -298,7 +298,7 @@ void Value::takeName(Value *V) { // void Value::uncheckedReplaceAllUsesWith(Value *New) { while (!use_empty()) { - Use &U = *UseList; + Use &U = *use_begin().U; // Must handle Constants specially, we cannot call replaceUsesOfWith on a // constant because they are uniqued. if (Constant *C = dyn_cast<Constant>(U.getUser())) { |