mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221951 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -61,6 +61,11 @@ class MDString : public Value {
|
|||||||
MDString(const MDString &) LLVM_DELETED_FUNCTION;
|
MDString(const MDString &) LLVM_DELETED_FUNCTION;
|
||||||
|
|
||||||
explicit MDString(LLVMContext &C);
|
explicit MDString(LLVMContext &C);
|
||||||
|
|
||||||
|
private:
|
||||||
|
/// \brief Shadow Value::getName() to prevent its use.
|
||||||
|
StringRef getName() const { return Value::getName(); }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static MDString *get(LLVMContext &Context, StringRef Str);
|
static MDString *get(LLVMContext &Context, StringRef Str);
|
||||||
static MDString *get(LLVMContext &Context, const char *Str) {
|
static MDString *get(LLVMContext &Context, const char *Str) {
|
||||||
|
@ -1159,7 +1159,7 @@ private:
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
for (auto H : HintTypes)
|
for (auto H : HintTypes)
|
||||||
if (Name->getName().endswith(H.Name))
|
if (Name->getString().endswith(H.Name))
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user