[ThinLTO] Re-commit of dot dumper after test fix

llvm-svn: 323116
This commit is contained in:
Eugene Leviant
2018-01-22 13:35:40 +00:00
parent 596fcb1b0f
commit 28d8a49f42
14 changed files with 436 additions and 31 deletions

View File

@@ -4813,8 +4813,12 @@ void ModuleSummaryIndexBitcodeReader::setValueGUID(
if (PrintSummaryGUIDs)
dbgs() << "GUID " << ValueGUID << "(" << OriginalNameID << ") is "
<< ValueName << "\n";
ValueIdToValueInfoMap[ValueID] =
std::make_pair(TheIndex.getOrInsertValueInfo(ValueGUID), OriginalNameID);
// UseStrtab is false for legacy summary formats and value names are
// created on stack. We can't use them outside of parseValueSymbolTable.
ValueIdToValueInfoMap[ValueID] = std::make_pair(
TheIndex.getOrInsertValueInfo(ValueGUID, UseStrtab ? ValueName : ""),
OriginalNameID);
}
// Specialized value symbol table parser used when reading module index
@@ -5679,7 +5683,8 @@ Expected<std::unique_ptr<ModuleSummaryIndex>> BitcodeModule::getSummary() {
BitstreamCursor Stream(Buffer);
Stream.JumpToBit(ModuleBit);
auto Index = llvm::make_unique<ModuleSummaryIndex>();
auto Index =
llvm::make_unique<ModuleSummaryIndex>(/*IsPerformingAnalysis=*/false);
ModuleSummaryIndexBitcodeReader R(std::move(Stream), Strtab, *Index,
ModuleIdentifier, 0);