- default: // Default behavior: ignore.
- break;
- // FS_PERMODULE_ENTRY: [valueid, islocal, instcount]
- case bitc::FS_CODE_PERMODULE_ENTRY: {
- unsigned ValueID = Record[0];
- bool IsLocal = Record[1];
- unsigned InstCount = Record[2];
- std::unique_ptr<FunctionSummary> FS =
- llvm::make_unique<FunctionSummary>(InstCount);
- FS->setLocalFunction(IsLocal);
- // The module path string ref set in the summary must be owned by the
- // index's module string table. Since we don't have a module path
- // string table section in the per-module index, we create a single
- // module path string table entry with an empty (0) ID to take
- // ownership.
- FS->setModulePath(
- TheIndex->addModulePath(Buffer->getBufferIdentifier(), 0));
- SummaryMap[ValueID] = std::move(FS);
- }
- // FS_COMBINED_ENTRY: [modid, instcount]
- case bitc::FS_CODE_COMBINED_ENTRY: {
- uint64_t ModuleId = Record[0];
- unsigned InstCount = Record[1];
- std::unique_ptr<FunctionSummary> FS =
- llvm::make_unique<FunctionSummary>(InstCount);
- FS->setModulePath(ModuleIdMap[ModuleId]);
- SummaryMap[CurRecordBit] = std::move(FS);
- }
+ default: // Default behavior: ignore.
+ break;
+ // FS_PERMODULE_ENTRY: [valueid, islocal, instcount]
+ case bitc::FS_CODE_PERMODULE_ENTRY: {
+ unsigned ValueID = Record[0];
+ bool IsLocal = Record[1];
+ unsigned InstCount = Record[2];
+ std::unique_ptr<FunctionSummary> FS =
+ llvm::make_unique<FunctionSummary>(InstCount);
+ FS->setLocalFunction(IsLocal);
+ // The module path string ref set in the summary must be owned by the
+ // index's module string table. Since we don't have a module path
+ // string table section in the per-module index, we create a single
+ // module path string table entry with an empty (0) ID to take
+ // ownership.
+ FS->setModulePath(
+ TheIndex->addModulePath(Buffer->getBufferIdentifier(), 0));
+ SummaryMap[ValueID] = std::move(FS);
+ }
+ // FS_COMBINED_ENTRY: [modid, instcount]
+ case bitc::FS_CODE_COMBINED_ENTRY: {
+ uint64_t ModuleId = Record[0];
+ unsigned InstCount = Record[1];
+ std::unique_ptr<FunctionSummary> FS =
+ llvm::make_unique<FunctionSummary>(InstCount);
+ FS->setModulePath(ModuleIdMap[ModuleId]);
+ SummaryMap[CurRecordBit] = std::move(FS);
+ }