| 2720 | } |
| 2721 | |
| 2722 | Error 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 | |
| 2743 | void BitcodeReader::setStripDebugInfo() { StripDebugInfo = true; } |
| 2744 |
nothing calls this directly
no test coverage detected