summaryrefslogtreecommitdiff
path: root/lib/VMCore/Value.cpp
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2008-09-19 15:03:57 +0000
committerGabor Greif <ggreif@gmail.com>2008-09-19 15:03:57 +0000
commit6c2c95d0acd867add034d93d4b909ddd75d61b14 (patch)
treeb167f6bf294bfe2c01fde421dc8ea5a871c3f78e /lib/VMCore/Value.cpp
parent210fada2c6bb31198722000e52059e41f6641c3b (diff)
downloadllvm-6c2c95d0acd867add034d93d4b909ddd75d61b14.tar.gz
llvm-6c2c95d0acd867add034d93d4b909ddd75d61b14.tar.bz2
llvm-6c2c95d0acd867add034d93d4b909ddd75d61b14.tar.xz
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.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VMCore/Value.cpp b/lib/VMCore/Value.cpp
index bc5b7a9f81..a5e0ff397e 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())) {