forked from OSchip/llvm-project
IR: Make MDString::getName() private
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. llvm-svn: 221951
This commit is contained in:
parent
01e87d3fe2
commit
77349e7aaf
|
@ -61,6 +61,11 @@ class MDString : public Value {
|
|||
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) {
|
||||
|
|
|
@ -1159,7 +1159,7 @@ private:
|
|||
return false;
|
||||
|
||||
for (auto H : HintTypes)
|
||||
if (Name->getName().endswith(H.Name))
|
||||
if (Name->getString().endswith(H.Name))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue