Use Twine, instead of StringRef, for consistency.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93249 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel
2010-01-12 18:57:56 +00:00
parent 26028f27dd
commit d77fdba573
2 changed files with 21 additions and 8 deletions

View File

@@ -194,10 +194,10 @@ class NamedMDNode : public Value, public ilist_node<NamedMDNode> {
void setParent(Module *M) { Parent = M; }
protected:
explicit NamedMDNode(LLVMContext &C, StringRef N, MDNode*const *Vals,
explicit NamedMDNode(LLVMContext &C, const Twine &N, MDNode*const *Vals,
unsigned NumVals, Module *M = 0);
public:
static NamedMDNode *Create(LLVMContext &C, StringRef N,
static NamedMDNode *Create(LLVMContext &C, const Twine &N,
MDNode *const *MDs,
unsigned NumMDs, Module *M = 0) {
return new NamedMDNode(C, N, MDs, NumMDs, M);
@@ -229,7 +229,7 @@ public:
void addOperand(MDNode *M);
/// setName - Set the name of this named metadata.
void setName(StringRef Name);
void setName(const Twine &NewName);
/// getName - Return a constant reference to this named metadata's name.
StringRef getName() const;