diff options
Diffstat (limited to 'include/llvm/Value.h')
-rw-r--r-- | include/llvm/Value.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/Value.h b/include/llvm/Value.h index 47933f0..fdc3aeb 100644 --- a/include/llvm/Value.h +++ b/include/llvm/Value.h @@ -240,6 +240,18 @@ public: return SubclassID; } + /// hasSameSubclassOptionalData - Test whether the optional flags contained + /// in this value are equal to the optional flags in the given value. + bool hasSameSubclassOptionalData(const Value *V) const { + return SubclassOptionalData == V->SubclassOptionalData; + } + + /// intersectOptionalDataWith - Clear any optional flags in this value + /// that are not also set in the given value. + void intersectOptionalDataWith(const Value *V) { + SubclassOptionalData &= V->SubclassOptionalData; + } + // Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const Value *) { return true; // Values are always values. |