Files
llvm-project/llvm/lib/IR/Metadata.cpp
Alexis Engelke 26b755c09b [IR] Remove Value::HasMetadata (#189917)
Metadata already has two separate implementations, one for GlobalObject
and one for Instruction. Instruction was already separate due to special
MD_dbg handling, so move the GlobalObject-specific metadata parts from
Value to GlobalObject.

The HasMetadata bit, originally an optimization to avoid the hash table
lookup when a value has no metadata, is no longer needed, because the
information is now stored directly in Instruction/GlobalObject's
MetadataIndex field.

This also fixes MSan builds, currently ~Value clears metadata and
therefore needs to access the subclass's MetadataIndex field, which was
already destructed at this point.
2026-04-01 14:02:57 +02:00

62 KiB