diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-03-24 16:30:18 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-03-24 16:30:18 +0000 |
| commit | a5e25a5563ff6f477b97f2b7ff62570ab61df845 (patch) | |
| tree | 41bf0a283dcba3b1f019a8ea4942c53a8335cf67 /llvm/lib/Bitcode/Writer/ValueEnumerator.cpp | |
| parent | 625fda2714acd03ea7c38887e827735d2af3102f (diff) | |
| download | bcm5719-llvm-a5e25a5563ff6f477b97f2b7ff62570ab61df845.tar.gz bcm5719-llvm-a5e25a5563ff6f477b97f2b7ff62570ab61df845.zip | |
BitcodeWriter: Move abbreviation for GenericDINode; almost NFC
Simplify ValueEnumerator and WriteModuleMetadata by shifting the logic
for the METADATA_GENERIC_DEBUG abbreviation into WriteGenericDINode.
(This is just like r264302, but for GenericDINode.)
The only change is that the abbreviation is emitted later in the
bitcode, just before the first `GenericDINode` record. This shouldn't
be observable though.
llvm-svn: 264303
Diffstat (limited to 'llvm/lib/Bitcode/Writer/ValueEnumerator.cpp')
| -rw-r--r-- | llvm/lib/Bitcode/Writer/ValueEnumerator.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp index 3490896a798..b6e8e57577c 100644 --- a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp +++ b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp @@ -280,7 +280,7 @@ static bool isIntOrIntVectorValue(const std::pair<const Value*, unsigned> &V) { ValueEnumerator::ValueEnumerator(const Module &M, bool ShouldPreserveUseListOrder) - : HasMDString(false), HasGenericDINode(false), + : HasMDString(false), ShouldPreserveUseListOrder(ShouldPreserveUseListOrder) { if (ShouldPreserveUseListOrder) UseListOrders = predictUseListOrder(M); @@ -532,7 +532,6 @@ void ValueEnumerator::EnumerateMetadata(const Metadata *MD) { EnumerateValue(C->getValue()); HasMDString |= isa<MDString>(MD); - HasGenericDINode |= isa<GenericDINode>(MD); // Replace the dummy ID inserted above with the correct one. MetadataMap may // have changed by inserting operands, so we need a fresh lookup here. |

