diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-12-06 11:50:26 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-12-06 11:50:26 +0000 |
commit | 85dadecbd664f60f0c7e4fbb44f083d43d01cfb7 (patch) | |
tree | 92aa39729108921c25d2101e9fcba83a521fc350 /include/llvm/Instruction.h | |
parent | fe03315925dafb484f850fbd86edd72bb8310144 (diff) | |
download | external_llvm-85dadecbd664f60f0c7e4fbb44f083d43d01cfb7.zip external_llvm-85dadecbd664f60f0c7e4fbb44f083d43d01cfb7.tar.gz external_llvm-85dadecbd664f60f0c7e4fbb44f083d43d01cfb7.tar.bz2 |
Push StringRefs through the metadata interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145934 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Instruction.h')
-rw-r--r-- | include/llvm/Instruction.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/llvm/Instruction.h b/include/llvm/Instruction.h index 934e890..38973b7 100644 --- a/include/llvm/Instruction.h +++ b/include/llvm/Instruction.h @@ -143,7 +143,7 @@ public: /// getMetadata - Get the metadata of given kind attached to this Instruction. /// If the metadata is not found then return null. - MDNode *getMetadata(const char *Kind) const { + MDNode *getMetadata(StringRef Kind) const { if (!hasMetadata()) return 0; return getMetadataImpl(Kind); } @@ -168,7 +168,7 @@ public: /// node. This updates/replaces metadata if already present, or removes it if /// Node is null. void setMetadata(unsigned KindID, MDNode *Node); - void setMetadata(const char *Kind, MDNode *Node); + void setMetadata(StringRef Kind, MDNode *Node); /// setDebugLoc - Set the debug location information for this instruction. void setDebugLoc(const DebugLoc &Loc) { DbgLoc = Loc; } @@ -185,7 +185,7 @@ private: // These are all implemented in Metadata.cpp. MDNode *getMetadataImpl(unsigned KindID) const; - MDNode *getMetadataImpl(const char *Kind) const; + MDNode *getMetadataImpl(StringRef Kind) const; void getAllMetadataImpl(SmallVectorImpl<std::pair<unsigned,MDNode*> > &)const; void getAllMetadataOtherThanDebugLocImpl(SmallVectorImpl<std::pair<unsigned, MDNode*> > &) const; |