mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Parse custom metadata attached with an instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83033 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -305,8 +305,10 @@ public:
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
/// MetadataContext -
|
||||
/// MetadataContext manages metadata used in a context.
|
||||
|
||||
/// MetadataContext handles uniquing and assignment of IDs for custom metadata
|
||||
/// types. Custom metadata handler names do not contain spaces. And the name
|
||||
/// must start with an alphabet. The regular expression used to check name
|
||||
/// is [a-zA-Z$._][a-zA-Z$._0-9]*
|
||||
class MetadataContext {
|
||||
public:
|
||||
typedef std::pair<unsigned, WeakVH> MDPairTy;
|
||||
@@ -330,6 +332,9 @@ public:
|
||||
/// is not registered then return 0.
|
||||
unsigned getMDKind(const char *Name);
|
||||
|
||||
/// validName - Return true if Name is a valid custom metadata handler name.
|
||||
bool validName(const char *Name);
|
||||
|
||||
/// getMD - Get the metadata of given kind attached with an Instruction.
|
||||
/// If the metadata is not found then return 0.
|
||||
MDNode *getMD(unsigned Kind, const Instruction *Inst);
|
||||
|
Reference in New Issue
Block a user