mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Verifier: Add operand checks for MDLexicalBlock
Add operand checks for `MDLexicalBlock` and `MDLexicalBlockFile`. Like `MDLocalVariable` and `MDLocation`, these nodes always require a scope. There was no test bitrot to fix here (just updated the serialization tests in test/Assembler/mdlexicalblock.ll). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233561 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -594,11 +594,11 @@ template <> struct MDNodeKeyImpl<MDLexicalBlock> {
|
||||
MDNodeKeyImpl(Metadata *Scope, Metadata *File, unsigned Line, unsigned Column)
|
||||
: Scope(Scope), File(File), Line(Line), Column(Column) {}
|
||||
MDNodeKeyImpl(const MDLexicalBlock *N)
|
||||
: Scope(N->getScope()), File(N->getFile()), Line(N->getLine()),
|
||||
: Scope(N->getRawScope()), File(N->getRawFile()), Line(N->getLine()),
|
||||
Column(N->getColumn()) {}
|
||||
|
||||
bool isKeyOf(const MDLexicalBlock *RHS) const {
|
||||
return Scope == RHS->getScope() && File == RHS->getFile() &&
|
||||
return Scope == RHS->getRawScope() && File == RHS->getRawFile() &&
|
||||
Line == RHS->getLine() && Column == RHS->getColumn();
|
||||
}
|
||||
unsigned getHashValue() const {
|
||||
@@ -614,11 +614,11 @@ template <> struct MDNodeKeyImpl<MDLexicalBlockFile> {
|
||||
MDNodeKeyImpl(Metadata *Scope, Metadata *File, unsigned Discriminator)
|
||||
: Scope(Scope), File(File), Discriminator(Discriminator) {}
|
||||
MDNodeKeyImpl(const MDLexicalBlockFile *N)
|
||||
: Scope(N->getScope()), File(N->getFile()),
|
||||
: Scope(N->getRawScope()), File(N->getRawFile()),
|
||||
Discriminator(N->getDiscriminator()) {}
|
||||
|
||||
bool isKeyOf(const MDLexicalBlockFile *RHS) const {
|
||||
return Scope == RHS->getScope() && File == RHS->getFile() &&
|
||||
return Scope == RHS->getRawScope() && File == RHS->getRawFile() &&
|
||||
Discriminator == RHS->getDiscriminator();
|
||||
}
|
||||
unsigned getHashValue() const {
|
||||
|
Reference in New Issue
Block a user