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 /include/llvm/Value.h | |
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 'include/llvm/Value.h')
-rw-r--r-- | include/llvm/Value.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/llvm/Value.h b/include/llvm/Value.h index 1d2c61e..b25f599 100644 --- a/include/llvm/Value.h +++ b/include/llvm/Value.h @@ -138,7 +138,7 @@ public: typedef value_use_iterator<User> use_iterator; typedef value_use_iterator<const User> use_const_iterator; - bool use_empty() const { return UseList == 0; } + bool use_empty() const { return Use::isNil(UseList); } use_iterator use_begin() { return use_iterator(UseList); } use_const_iterator use_begin() const { return use_const_iterator(UseList); } use_iterator use_end() { return use_iterator(0); } @@ -245,14 +245,16 @@ inline raw_ostream &operator<<(raw_ostream &OS, const Value &V) { } void Use::init(Value *V, User *) { - Val = V; + Val1 = V; if (V) V->addUse(*this); + else Next = nilUse(0); } void Use::set(Value *V) { - if (Val) removeFromList(); - Val = V; + if (Val1) removeFromList(); + Val1 = V; if (V) V->addUse(*this); + else Next = nilUse(0); } |