aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/IR/Constant.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/IR/Constant.h')
-rw-r--r--include/llvm/IR/Constant.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/include/llvm/IR/Constant.h b/include/llvm/IR/Constant.h
index 26bad1dd1f79..82ad9fc2f407 100644
--- a/include/llvm/IR/Constant.h
+++ b/include/llvm/IR/Constant.h
@@ -41,8 +41,8 @@ namespace llvm {
class Constant : public User {
void operator=(const Constant &) LLVM_DELETED_FUNCTION;
Constant(const Constant &) LLVM_DELETED_FUNCTION;
- virtual void anchor();
-
+ void anchor() override;
+
protected:
Constant(Type *ty, ValueTy vty, Use *Ops, unsigned NumOps)
: User(ty, vty, Ops, NumOps) {}
@@ -64,6 +64,9 @@ public:
/// Return true if the value is negative zero or null value.
bool isZeroValue() const;
+ /// \brief Return true if the value is the smallest signed value.
+ bool isMinSignedValue() const;
+
/// canTrap - Return true if evaluation of this constant could trap. This is
/// true for things like constant expressions that could divide by zero.
bool canTrap() const;
@@ -71,6 +74,9 @@ public:
/// isThreadDependent - Return true if the value can vary between threads.
bool isThreadDependent() const;
+ /// Return true if the value is dependent on a dllimport variable.
+ bool isDLLImportDependent() const;
+
/// isConstantUsed - Return true if the constant has users other than constant
/// exprs and other dangling things.
bool isConstantUsed() const;
@@ -163,6 +169,14 @@ public:
/// that want to check to see if a global is unused, but don't want to deal
/// with potentially dead constants hanging off of the globals.
void removeDeadConstantUsers() const;
+
+ Constant *stripPointerCasts() {
+ return cast<Constant>(Value::stripPointerCasts());
+ }
+
+ const Constant *stripPointerCasts() const {
+ return const_cast<Constant*>(this)->stripPointerCasts();
+ }
};
} // End llvm namespace