MCPcopy Create free account
hub / github.com/GANGE666/xVMP / addRawAttributeValue

Function addRawAttributeValue

src/lib/Bitcode/Reader/BitcodeReader.cpp:1207–1226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1205}
1206
1207static void addRawAttributeValue(AttrBuilder &B, uint64_t Val) {
1208 if (!Val) return;
1209
1210 for (Attribute::AttrKind I = Attribute::None; I != Attribute::EndAttrKinds;
1211 I = Attribute::AttrKind(I + 1)) {
1212 if (I == Attribute::Dereferenceable ||
1213 I == Attribute::DereferenceableOrNull ||
1214 I == Attribute::ArgMemOnly ||
1215 I == Attribute::AllocSize)
1216 continue;
1217 if (uint64_t A = (Val & getRawAttributeMask(I))) {
1218 if (I == Attribute::Alignment)
1219 B.addAlignmentAttr(1ULL << ((A >> 16) - 1));
1220 else if (I == Attribute::StackAlignment)
1221 B.addStackAlignmentAttr(1ULL << ((A >> 26)-1));
1222 else
1223 B.addAttribute(I);
1224 }
1225 }
1226}
1227
1228/// This fills an AttrBuilder object with the LLVM attributes that have
1229/// been decoded from the given integer. This function must stay in sync with

Callers 1

Calls 3

getRawAttributeMaskFunction · 0.85
AttrKindEnum · 0.50
addAttributeMethod · 0.45

Tested by

no test coverage detected