Lines Matching defs:Key
24 // Return an MDTuple with two elements. The first element is a string Key and
26 static Metadata *getKeyValMD(LLVMContext &Context, const char *Key,
29 Metadata *Ops[2] = {MDString::get(Context, Key),
34 static Metadata *getKeyFPValMD(LLVMContext &Context, const char *Key,
37 Metadata *Ops[2] = {MDString::get(Context, Key),
42 // Return an MDTuple with two elements. The first element is a string Key and
44 static Metadata *getKeyValMD(LLVMContext &Context, const char *Key,
46 Metadata *Ops[2] = {MDString::get(Context, Key), MDString::get(Context, Val)};
103 // Get the value metadata for the input MD/Key.
104 static ConstantAsMetadata *getValMD(MDTuple *MD, const char *Key) {
113 if (KeyMD->getString() != Key)
118 // Parse an MDTuple representing (Key, Val) pair.
119 static bool getVal(MDTuple *MD, const char *Key, uint64_t &Val) {
120 if (auto *ValMD = getValMD(MD, Key)) {
127 static bool getVal(MDTuple *MD, const char *Key, double &Val) {
128 if (auto *ValMD = getValMD(MD, Key)) {
135 // Check if an MDTuple represents a (Key, Val) pair.
136 static bool isKeyValuePair(MDTuple *MD, const char *Key, const char *Val) {
143 if (KeyMD->getString() != Key || ValMD->getString() != Val)
181 static bool getOptionalVal(MDTuple *Tuple, unsigned &Idx, const char *Key,
183 if (getVal(dyn_cast<MDTuple>(Tuple->getOperand(Idx)), Key, Value)) {