mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-05 11:46:42 +00:00
privatize another interface.
llvm-svn: 92255
This commit is contained in:
parent
c39498971e
commit
fde39fb4f6
@ -221,9 +221,6 @@ public:
|
|||||||
/// getMDKindID - Return a unique non-zero ID for the specified metadata kind.
|
/// getMDKindID - Return a unique non-zero ID for the specified metadata kind.
|
||||||
unsigned getMDKindID(StringRef Name) const;
|
unsigned getMDKindID(StringRef Name) const;
|
||||||
|
|
||||||
/// isValidName - Return true if Name is a valid custom metadata handler name.
|
|
||||||
static bool isValidName(StringRef Name);
|
|
||||||
|
|
||||||
/// getMDKindNames - Populate client supplied SmallVector with the name for
|
/// getMDKindNames - Populate client supplied SmallVector with the name for
|
||||||
/// each custom metadata ID. ID #0 is not used, so it is filled in as empty.
|
/// each custom metadata ID. ID #0 is not used, so it is filled in as empty.
|
||||||
void getMDKindNames(SmallVectorImpl<StringRef> &) const;
|
void getMDKindNames(SmallVectorImpl<StringRef> &) const;
|
||||||
|
@ -389,8 +389,9 @@ void MetadataContextImpl::removeAllMetadata(Instruction *Inst) {
|
|||||||
MetadataContext::MetadataContext() : pImpl(new MetadataContextImpl()) { }
|
MetadataContext::MetadataContext() : pImpl(new MetadataContextImpl()) { }
|
||||||
MetadataContext::~MetadataContext() { delete pImpl; }
|
MetadataContext::~MetadataContext() { delete pImpl; }
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
/// isValidName - Return true if Name is a valid custom metadata handler name.
|
/// isValidName - Return true if Name is a valid custom metadata handler name.
|
||||||
bool MetadataContext::isValidName(StringRef MDName) {
|
static bool isValidName(StringRef MDName) {
|
||||||
if (MDName.empty())
|
if (MDName.empty())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -404,9 +405,11 @@ bool MetadataContext::isValidName(StringRef MDName) {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/// getMDKindID - Return a unique non-zero ID for the specified metadata kind.
|
/// getMDKindID - Return a unique non-zero ID for the specified metadata kind.
|
||||||
unsigned MetadataContext::getMDKindID(StringRef Name) const {
|
unsigned MetadataContext::getMDKindID(StringRef Name) const {
|
||||||
|
assert(isValidName(Name) && "Invalid MDNode name");
|
||||||
return pImpl->getMDKindID(Name);
|
return pImpl->getMDKindID(Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user