[llvm] [DebugInfo] Add DILayerLoc/DILayerLocList and DILocation irlayers operand (PR #215666)
Stephen Tozer via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 25 05:53:01 PDT 2026
================
@@ -1472,8 +1472,12 @@ Error MetadataLoader::MetadataLoaderImpl::parseOneMetadata(
break;
}
case bitc::METADATA_LOCATION: {
- // 5: inlinedAt, 6: isImplicit, 8: Key Instructions fields.
- if (Record.size() != 5 && Record.size() != 6 && Record.size() != 8)
+ // Defined shapes: 5 (through inlinedAt), 6 (isImplicit), 8 (adds the Key
+ // Instructions fields), 9 (adds irlayers). Anything longer is a record from
+ // a newer writer and its trailing fields are ignored, which is what makes
+ // this encoding append-only; anything shorter, or a 7 (an atomGroup with no
+ // atomRank), is a shape no writer produces.
+ if (Record.size() < 5 || Record.size() == 7)
----------------
SLTozer wrote:
It seems like this should also reject `Record.size() > 9` too?
https://github.com/llvm/llvm-project/pull/215666
More information about the llvm-commits
mailing list