Parse the specified bitcode buffer, returning the function info index.
| 5916 | |
| 5917 | // Parse the specified bitcode buffer, returning the function info index. |
| 5918 | Expected<std::unique_ptr<ModuleSummaryIndex>> BitcodeModule::getSummary() { |
| 5919 | BitstreamCursor Stream(Buffer); |
| 5920 | Stream.JumpToBit(ModuleBit); |
| 5921 | |
| 5922 | auto Index = llvm::make_unique<ModuleSummaryIndex>(/*HaveGVs=*/false); |
| 5923 | ModuleSummaryIndexBitcodeReader R(std::move(Stream), Strtab, *Index, |
| 5924 | ModuleIdentifier, 0); |
| 5925 | |
| 5926 | if (Error Err = R.parseModule()) |
| 5927 | return std::move(Err); |
| 5928 | |
| 5929 | return std::move(Index); |
| 5930 | } |
| 5931 | |
| 5932 | static Expected<bool> getEnableSplitLTOUnitFlag(BitstreamCursor &Stream, |
| 5933 | unsigned ID) { |