diff options
author | Devang Patel <dpatel@apple.com> | 2009-09-23 18:32:25 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-09-23 18:32:25 +0000 |
commit | 6c6c016b1b9711bc8968b51746d4b867e17905f4 (patch) | |
tree | cdcafde3e7492bca87ae98a140bcf43898a94a94 /include | |
parent | 79997912a7ad36083f7543cfc41387671ec4c1fa (diff) | |
download | llvm-6c6c016b1b9711bc8968b51746d4b867e17905f4.tar.gz llvm-6c6c016b1b9711bc8968b51746d4b867e17905f4.tar.bz2 llvm-6c6c016b1b9711bc8968b51746d4b867e17905f4.tar.xz |
Do not leave behind metadata while cloning an instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82638 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Metadata.h | 6 | ||||
-rw-r--r-- | include/llvm/Value.h | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/include/llvm/Metadata.h b/include/llvm/Metadata.h index 21f907a371..001bfca961 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 864d4904c8..ab6247e801 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) { |