Skip to content

Commit 428c6d6

Browse files
committed
IR: Remove null UseList checks in hasNUses methods
1 parent c528f60 commit 428c6d6

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

llvm/lib/IR/Value.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,18 +148,10 @@ void Value::destroyValueName() {
148148
}
149149

150150
bool Value::hasNUses(unsigned N) const {
151-
if (!UseList)
152-
return N == 0;
153-
154-
// TODO: Disallow for ConstantData and remove !UseList check?
155151
return hasNItems(use_begin(), use_end(), N);
156152
}
157153

158154
bool Value::hasNUsesOrMore(unsigned N) const {
159-
// TODO: Disallow for ConstantData and remove !UseList check?
160-
if (!UseList)
161-
return N == 0;
162-
163155
return hasNItemsOrMore(use_begin(), use_end(), N);
164156
}
165157

0 commit comments

Comments
 (0)