aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Value.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Value.h b/include/llvm/Value.h
index 35a30a81d5..7e7b415ffd 100644
--- a/include/llvm/Value.h
+++ b/include/llvm/Value.h
@@ -146,6 +146,12 @@ public:
// Only use when in type resolution situations!
void uncheckedReplaceAllUsesWith(Value *V);
+ /// clearOptionalData - Clear any optional optimization data from this Value.
+ /// Transformation passes must call this method whenever changing the IR
+ /// in a way that would affect the values produced by this Value, unless
+ /// it takes special care to ensure correctness in some other way.
+ void clearOptionalData() { SubclassOptionalData = 0; }
+
//----------------------------------------------------------------------
// Methods for handling the chain of uses of this Value.
//