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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user