mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-12 05:56:28 +00:00
[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
This commit is contained in:
parent
406ed15c52
commit
3d8292c60a
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user