diff options
author | Teresa Johnson <tejohnson@google.com> | 2016-10-28 19:36:00 +0000 |
---|---|---|
committer | Teresa Johnson <tejohnson@google.com> | 2016-10-28 19:36:00 +0000 |
commit | 7c31cb16655df6ada5cf0303de2802397be599e7 (patch) | |
tree | e82d93f48cfc8cce8c962ec9e30cd3f7d81c8234 /llvm/lib/Bitcode | |
parent | 013fd7315ff206c42ae30bb115493e0583235bb3 (diff) | |
download | bcm5719-llvm-7c31cb16655df6ada5cf0303de2802397be599e7.tar.gz bcm5719-llvm-7c31cb16655df6ada5cf0303de2802397be599e7.zip |
[ThinLTO] Use flags from summary when writing variable summary (NFC)
We already read the flags out of the summary when writing the summary
records for functions and aliases, do the same for variables.
This is an NFC change for now since the flags computed on the fly from
the GlobalValue currently will always match those in the summary
already, but once I send a follow-on patch to set the NoRename flag for
locals in the llvm.used set this becomes a necessary change.
llvm-svn: 285433
Diffstat (limited to 'llvm/lib/Bitcode')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 62008c42d3d..bea54ca1444 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -3331,9 +3331,9 @@ void ModuleBitcodeWriter::writeModuleLevelReferences( if (V.isDeclaration()) return; NameVals.push_back(VE.getValueID(&V)); - NameVals.push_back(getEncodedGVSummaryFlags(V)); auto *Summary = Index->getGlobalValueSummary(V); GlobalVarSummary *VS = cast<GlobalVarSummary>(Summary); + NameVals.push_back(getEncodedGVSummaryFlags(VS->flags())); unsigned SizeBeforeRefs = NameVals.size(); for (auto &RI : VS->refs()) |