mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
IR: Introduce GenericDwarfNode
As part of PR22235, introduce `DwarfNode` and `GenericDwarfNode`. The former is a metadata node with a DWARF tag. The latter matches our current (generic) schema of a header with string (and stringified integer) data and an arbitrary number of operands. This doesn't move it into place yet; that change will require a large number of testcase updates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226529 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -180,11 +180,11 @@ namespace llvm {
|
||||
static const Metadata *get_hashable_data(const MDOperand &X) { return X.get(); }
|
||||
}
|
||||
|
||||
unsigned MDNodeOpsKey::calculateHash(MDNode *N) {
|
||||
unsigned Hash = hash_combine_range(N->op_begin(), N->op_end());
|
||||
unsigned MDNodeOpsKey::calculateHash(MDNode *N, unsigned Offset) {
|
||||
unsigned Hash = hash_combine_range(N->op_begin() + Offset, N->op_end());
|
||||
#ifndef NDEBUG
|
||||
{
|
||||
SmallVector<Metadata *, 8> MDs(N->op_begin(), N->op_end());
|
||||
SmallVector<Metadata *, 8> MDs(N->op_begin() + Offset, N->op_end());
|
||||
unsigned RawHash = calculateHash(MDs);
|
||||
assert(Hash == RawHash &&
|
||||
"Expected hash of MDOperand to equal hash of Metadata*");
|
||||
|
||||
Reference in New Issue
Block a user