summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/LLVMContextImpl.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-20 00:01:43 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-20 00:01:43 +0000
commitfed199a75859a176a22e4135980a1a497b64e628 (patch)
tree28f0d754ef17b6a0eaa6db860f2865b37b25a800 /llvm/lib/IR/LLVMContextImpl.cpp
parentd5ac1ab65d4c305cfbf107f2dedfdd94474ffa37 (diff)
downloadbcm5719-llvm-fed199a75859a176a22e4135980a1a497b64e628.tar.gz
bcm5719-llvm-fed199a75859a176a22e4135980a1a497b64e628.zip
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. llvm-svn: 226529
Diffstat (limited to 'llvm/lib/IR/LLVMContextImpl.cpp')
-rw-r--r--llvm/lib/IR/LLVMContextImpl.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/IR/LLVMContextImpl.cpp b/llvm/lib/IR/LLVMContextImpl.cpp
index 0c50a120d5d..81ff9a96f49 100644
--- a/llvm/lib/IR/LLVMContextImpl.cpp
+++ b/llvm/lib/IR/LLVMContextImpl.cpp
@@ -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*");
OpenPOWER on IntegriCloud