aboutsummaryrefslogtreecommitdiff
path: root/llvm/include/llvm/IR/Constant.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include/llvm/IR/Constant.h')
-rw-r--r--llvm/include/llvm/IR/Constant.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/include/llvm/IR/Constant.h b/llvm/include/llvm/IR/Constant.h
index c8999b71f3d1..a97372ebbad2 100644
--- a/llvm/include/llvm/IR/Constant.h
+++ b/llvm/include/llvm/IR/Constant.h
@@ -204,6 +204,12 @@ public:
/// Constant::removeDeadConstantUsers, but doesn't remove dead constants.
bool hasOneLiveUse() const;
+ /// Return true if the constant has no live uses.
+ ///
+ /// This returns the same result as calling Value::use_empty after
+ /// Constant::removeDeadConstantUsers, but doesn't remove dead constants.
+ bool hasZeroLiveUses() const;
+
const Constant *stripPointerCasts() const {
return cast<Constant>(Value::stripPointerCasts());
}
@@ -244,6 +250,8 @@ private:
/// Determine what potential relocations may be needed by this constant.
PossibleRelocationsTy getRelocationInfo() const;
+
+ bool hasNLiveUses(unsigned N) const;
};
} // end namespace llvm