mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Cosmetic changes.
s/validName/isValidName/g s/with an Instruction/to an Instruction/g s/RegisterMDKind/registerMDKind/g git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84689 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -295,25 +295,25 @@ private:
|
|||||||
StringMap<unsigned> MDHandlerNames;
|
StringMap<unsigned> MDHandlerNames;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// RegisterMDKind - Register a new metadata kind and return its ID.
|
/// registerMDKind - Register a new metadata kind and return its ID.
|
||||||
/// A metadata kind can be registered only once.
|
/// A metadata kind can be registered only once.
|
||||||
unsigned RegisterMDKind(const char *Name);
|
unsigned registerMDKind(const char *Name);
|
||||||
|
|
||||||
/// getMDKind - Return metadata kind. If the requested metadata kind
|
/// getMDKind - Return metadata kind. If the requested metadata kind
|
||||||
/// is not registered then return 0.
|
/// is not registered then return 0.
|
||||||
unsigned getMDKind(const char *Name);
|
unsigned getMDKind(const char *Name);
|
||||||
|
|
||||||
/// validName - Return true if Name is a valid custom metadata handler name.
|
/// isValidName - Return true if Name is a valid custom metadata handler name.
|
||||||
bool validName(const char *Name);
|
bool isValidName(const char *Name);
|
||||||
|
|
||||||
/// getMD - Get the metadata of given kind attached with an Instruction.
|
/// getMD - Get the metadata of given kind attached to an Instruction.
|
||||||
/// If the metadata is not found then return 0.
|
/// If the metadata is not found then return 0.
|
||||||
MDNode *getMD(unsigned Kind, const Instruction *Inst);
|
MDNode *getMD(unsigned Kind, const Instruction *Inst);
|
||||||
|
|
||||||
/// getMDs - Get the metadata attached with an Instruction.
|
/// getMDs - Get the metadata attached to an Instruction.
|
||||||
const MDMapTy *getMDs(const Instruction *Inst);
|
const MDMapTy *getMDs(const Instruction *Inst);
|
||||||
|
|
||||||
/// addMD - Attach the metadata of given kind with an Instruction.
|
/// addMD - Attach the metadata of given kind to an Instruction.
|
||||||
void addMD(unsigned Kind, MDNode *Node, Instruction *Inst);
|
void addMD(unsigned Kind, MDNode *Node, Instruction *Inst);
|
||||||
|
|
||||||
/// removeMD - Remove metadata of given kind attached with an instuction.
|
/// removeMD - Remove metadata of given kind attached with an instuction.
|
||||||
|
@ -139,7 +139,7 @@ public:
|
|||||||
if (MDKind == 0)
|
if (MDKind == 0)
|
||||||
MDKind = Context.getMetadata().getMDKind("dbg");
|
MDKind = Context.getMetadata().getMDKind("dbg");
|
||||||
if (MDKind == 0)
|
if (MDKind == 0)
|
||||||
MDKind = Context.getMetadata().RegisterMDKind("dbg");
|
MDKind = Context.getMetadata().registerMDKind("dbg");
|
||||||
CurDbgLocation = L;
|
CurDbgLocation = L;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1067,7 +1067,7 @@ bool LLParser::ParseOptionalCustomMetadata() {
|
|||||||
MetadataContext &TheMetadata = M->getContext().getMetadata();
|
MetadataContext &TheMetadata = M->getContext().getMetadata();
|
||||||
unsigned MDK = TheMetadata.getMDKind(Name.c_str());
|
unsigned MDK = TheMetadata.getMDKind(Name.c_str());
|
||||||
if (!MDK)
|
if (!MDK)
|
||||||
MDK = TheMetadata.RegisterMDKind(Name.c_str());
|
MDK = TheMetadata.registerMDKind(Name.c_str());
|
||||||
MDsOnInst.push_back(std::make_pair(MDK, cast<MDNode>(Node)));
|
MDsOnInst.push_back(std::make_pair(MDK, cast<MDNode>(Node)));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -245,10 +245,10 @@ NamedMDNode::~NamedMDNode() {
|
|||||||
// MetadataContext implementation.
|
// MetadataContext implementation.
|
||||||
//
|
//
|
||||||
|
|
||||||
/// RegisterMDKind - Register a new metadata kind and return its ID.
|
/// registerMDKind - Register a new metadata kind and return its ID.
|
||||||
/// A metadata kind can be registered only once.
|
/// A metadata kind can be registered only once.
|
||||||
unsigned MetadataContext::RegisterMDKind(const char *Name) {
|
unsigned MetadataContext::registerMDKind(const char *Name) {
|
||||||
assert(validName(Name) && "Invalid custome metadata name!");
|
assert(isValidName(Name) && "Invalid custome metadata name!");
|
||||||
unsigned Count = MDHandlerNames.size();
|
unsigned Count = MDHandlerNames.size();
|
||||||
assert(MDHandlerNames.find(Name) == MDHandlerNames.end()
|
assert(MDHandlerNames.find(Name) == MDHandlerNames.end()
|
||||||
&& "Already registered MDKind!");
|
&& "Already registered MDKind!");
|
||||||
@ -256,8 +256,8 @@ unsigned MetadataContext::RegisterMDKind(const char *Name) {
|
|||||||
return Count + 1;
|
return Count + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// validName - 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::validName(const char *Name) {
|
bool MetadataContext::isValidName(const char *Name) {
|
||||||
if (!Name)
|
if (!Name)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -280,7 +280,7 @@ bool MetadataContext::validName(const char *Name) {
|
|||||||
/// getMDKind - Return metadata kind. If the requested metadata kind
|
/// getMDKind - Return metadata kind. If the requested metadata kind
|
||||||
/// is not registered then return 0.
|
/// is not registered then return 0.
|
||||||
unsigned MetadataContext::getMDKind(const char *Name) {
|
unsigned MetadataContext::getMDKind(const char *Name) {
|
||||||
assert(validName(Name) && "Invalid custome metadata name!");
|
assert(isValidName(Name) && "Invalid custome metadata name!");
|
||||||
StringMap<unsigned>::iterator I = MDHandlerNames.find(Name);
|
StringMap<unsigned>::iterator I = MDHandlerNames.find(Name);
|
||||||
if (I == MDHandlerNames.end())
|
if (I == MDHandlerNames.end())
|
||||||
return 0;
|
return 0;
|
||||||
@ -288,7 +288,7 @@ unsigned MetadataContext::getMDKind(const char *Name) {
|
|||||||
return I->getValue();
|
return I->getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// addMD - Attach the metadata of given kind with an Instruction.
|
/// addMD - Attach the metadata of given kind to an Instruction.
|
||||||
void MetadataContext::addMD(unsigned MDKind, MDNode *Node, Instruction *Inst) {
|
void MetadataContext::addMD(unsigned MDKind, MDNode *Node, Instruction *Inst) {
|
||||||
assert(Node && "Invalid null MDNode");
|
assert(Node && "Invalid null MDNode");
|
||||||
Inst->HasMetadata = true;
|
Inst->HasMetadata = true;
|
||||||
@ -362,7 +362,7 @@ void MetadataContext::copyMD(Instruction *In1, Instruction *In2) {
|
|||||||
addMD(I->first, MD, In2);
|
addMD(I->first, MD, In2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// getMD - Get the metadata of given kind attached with an Instruction.
|
/// getMD - Get the metadata of given kind attached to an Instruction.
|
||||||
/// If the metadata is not found then return 0.
|
/// If the metadata is not found then return 0.
|
||||||
MDNode *MetadataContext::getMD(unsigned MDKind, const Instruction *Inst) {
|
MDNode *MetadataContext::getMD(unsigned MDKind, const Instruction *Inst) {
|
||||||
MDStoreTy::iterator I = MetadataStore.find(Inst);
|
MDStoreTy::iterator I = MetadataStore.find(Inst);
|
||||||
@ -376,7 +376,7 @@ MDNode *MetadataContext::getMD(unsigned MDKind, const Instruction *Inst) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// getMDs - Get the metadata attached with an Instruction.
|
/// getMDs - Get the metadata attached to an Instruction.
|
||||||
const MetadataContext::MDMapTy *
|
const MetadataContext::MDMapTy *
|
||||||
MetadataContext::getMDs(const Instruction *Inst) {
|
MetadataContext::getMDs(const Instruction *Inst) {
|
||||||
MDStoreTy::iterator I = MetadataStore.find(Inst);
|
MDStoreTy::iterator I = MetadataStore.find(Inst);
|
||||||
|
Reference in New Issue
Block a user