aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Metadata.h6
-rw-r--r--include/llvm/Value.h3
2 files changed, 8 insertions, 1 deletions
diff --git a/include/llvm/Metadata.h b/include/llvm/Metadata.h
index 21f907a..001bfca 100644
--- a/include/llvm/Metadata.h
+++ b/include/llvm/Metadata.h
@@ -351,8 +351,12 @@ public:
/// ValueIsDeleted - This handler is used to update metadata store
/// when a value is deleted.
- void ValueIsDeleted(Value *V) {}
+ void ValueIsDeleted(const Value *V) {}
void ValueIsDeleted(const Instruction *Inst);
+
+ /// ValueIsCloned - This handler is used to update metadata store
+ /// when In1 is cloned to create In2.
+ void ValueIsCloned(const Instruction *In1, Instruction *In2);
};
} // end llvm namespace
diff --git a/include/llvm/Value.h b/include/llvm/Value.h
index 864d490..ab6247e 100644
--- a/include/llvm/Value.h
+++ b/include/llvm/Value.h
@@ -298,6 +298,9 @@ public:
const BasicBlock *PredBB) const{
return const_cast<Value*>(this)->DoPHITranslation(CurBB, PredBB);
}
+
+ /// hasMetadata - Return true if metadata is attached with this value.
+ bool hasMetadata() const { return HasMetadata; }
};
inline raw_ostream &operator<<(raw_ostream &OS, const Value &V) {