diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-03-24 16:25:51 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-03-24 16:25:51 +0000 |
commit | 625fda2714acd03ea7c38887e827735d2af3102f (patch) | |
tree | 78981feb135d3a0259cb221a3b6da08f2dc9d827 /llvm/lib/Bitcode/Writer/ValueEnumerator.cpp | |
parent | f8ecdf528459b309ea55c593ed2748443d14878e (diff) | |
download | llvm-625fda2714acd03ea7c38887e827735d2af3102f.zip llvm-625fda2714acd03ea7c38887e827735d2af3102f.tar.gz llvm-625fda2714acd03ea7c38887e827735d2af3102f.tar.bz2 |
BitcodeWriter: Move abbreviation for DILocation; almost NFC
Simplify ValueEnumerator and WriteModuleMetadata by shifting the logic
for the METADATA_LOCATION abbreviation into WriteDILocation.
The only change is that the abbreviation is emitted later in the
bitcode, just before the first `DILocation` record. This shouldn't be
observable though.
llvm-svn: 264302
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 fea5699..3490896 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), HasDILocation(false), HasGenericDINode(false), + : HasMDString(false), HasGenericDINode(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); - HasDILocation |= isa<DILocation>(MD); HasGenericDINode |= isa<GenericDINode>(MD); // Replace the dummy ID inserted above with the correct one. MetadataMap may |