[ThinLTO] Add string saver onto index for value names
authorTeresa Johnson <tejohnson@google.com>
Tue, 26 Jun 2018 02:29:08 +0000 (02:29 +0000)
committerTeresa Johnson <tejohnson@google.com>
Tue, 26 Jun 2018 02:29:08 +0000 (02:29 +0000)
commit519055336d09b510273e1810161832a6e1336838
tree9f30628dcdd59cfdf5157b252ab20b24d3afecb0
parente44acadf6ab0ec228dcba2e02b495c1dfe7338dd
[ThinLTO] Add string saver onto index for value names

Summary:
Adds a string saver to the ModuleSummaryIndex so it can store value
names in the case of adding a ValueInfo for a GUID when we don't
have the name stored in a Module string table. This is motivated
by the upcoming summary parser patch, where we will read value names
from the summary entry and want to store them, even when a Module
is not available.

Currently this allows us to store the name in the legacy bitcode case,
and I have added a test to show that.

Reviewers: pcc, dexonsmith

Subscribers: mehdi_amini, inglorion, eraman, steven_wu, llvm-commits

Differential Revision: https://reviews.llvm.org/D47842

llvm-svn: 335570
llvm/include/llvm/IR/ModuleSummaryIndex.h
llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/test/ThinLTO/X86/autoupgrade.ll