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 | 6b7c1e84c407ef2ba17ed953f0368eb54a5ef106 (patch) | |
tree | cdcafde3e7492bca87ae98a140bcf43898a94a94 /include/llvm | |
parent | 724190977bf4a7289c24e923f33ad6b7e172cfbf (diff) | |
download | external_llvm-6b7c1e84c407ef2ba17ed953f0368eb54a5ef106.zip external_llvm-6b7c1e84c407ef2ba17ed953f0368eb54a5ef106.tar.gz external_llvm-6b7c1e84c407ef2ba17ed953f0368eb54a5ef106.tar.bz2 |
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/llvm')
-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 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) { |