diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-04-02 17:12:00 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-04-02 17:12:00 +0000 |
commit | 4b520e5ef6abd5f109a1c646ac1e31952dd76f8f (patch) | |
tree | 6353c75bdc650cf26c5b7586cffde7673e1f8d2c /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | da4a56d1abf0aa34dcb721c4b2d704a7715c23c1 (diff) | |
download | llvm-4b520e5ef6abd5f109a1c646ac1e31952dd76f8f.zip llvm-4b520e5ef6abd5f109a1c646ac1e31952dd76f8f.tar.gz llvm-4b520e5ef6abd5f109a1c646ac1e31952dd76f8f.tar.bz2 |
Linker: Remove IRMover::isMetadataUnneeded indirection; almost NFC
Instead of checking live during MapMetadata whether a subprogram is
needed, seed the ValueMap with `nullptr` up-front.
There is a small hypothetical functionality change. Previously, calling
MapMetadataOp on a node whose "scope:" chain led to an unneeded
subprogram would return nullptr. However, if that were ever called,
then the subprogram would be needed; a situation that the IRMover is
supposed to avoid a priori!
Besides cleaning up the code a little, this restores a nice property:
MapMetadataOp returns the same as MapMetadata.
llvm-svn: 265229
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions