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

Method materializeMetadata

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

Source from the content-addressed store, hash-verified

2720}
2721
2722Error BitcodeReader::materializeMetadata() {
2723 for (uint64_t BitPos : DeferredMetadataInfo) {
2724 // Move the bit stream to the saved position.
2725 Stream.JumpToBit(BitPos);
2726 if (Error Err = MDLoader->parseModuleMetadata())
2727 return Err;
2728 }
2729
2730 // Upgrade "Linker Options" module flag to "llvm.linker.options" module-level
2731 // metadata.
2732 if (Metadata *Val = TheModule->getModuleFlag("Linker Options")) {
2733 NamedMDNode *LinkerOpts =
2734 TheModule->getOrInsertNamedMetadata("llvm.linker.options");
2735 for (const MDOperand &MDOptions : cast<MDNode>(Val)->operands())
2736 LinkerOpts->addOperand(cast<MDNode>(MDOptions));
2737 }
2738
2739 DeferredMetadataInfo.clear();
2740 return Error::success();
2741}
2742
2743void BitcodeReader::setStripDebugInfo() { StripDebugInfo = true; }
2744

Callers

nothing calls this directly

Calls 8

successFunction · 0.85
JumpToBitMethod · 0.80
parseModuleMetadataMethod · 0.80
getModuleFlagMethod · 0.80
operandsMethod · 0.45
addOperandMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected