Hide the fact that `MDString`'s string is stored in `Value::Name` --
that's going to change soon. Update the only in-tree client that was
using it instead of `Value::getString()`.
Part of PR21532.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221951
91177308-0d34-0410-b5e6-
96231b3b80d8
MDString(const MDString &) LLVM_DELETED_FUNCTION;
explicit MDString(LLVMContext &C);
+
+private:
+ /// \brief Shadow Value::getName() to prevent its use.
+ StringRef getName() const { return Value::getName(); }
+
public:
static MDString *get(LLVMContext &Context, StringRef Str);
static MDString *get(LLVMContext &Context, const char *Str) {
return false;
for (auto H : HintTypes)
- if (Name->getName().endswith(H.Name))
+ if (Name->getString().endswith(H.Name))
return true;
return false;
}