summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/LLVMContextImpl.h
diff options
context:
space:
mode:
authorMomchil Velikov <momchil.velikov@arm.com>2018-02-12 16:10:09 +0000
committerMomchil Velikov <momchil.velikov@arm.com>2018-02-12 16:10:09 +0000
commit08dc66eff0c7ad594584a8a6925ef830cd6873a1 (patch)
tree36a9dc79a29945f66faf9ac868a413e9733cc037 /llvm/lib/IR/LLVMContextImpl.h
parentb941f5dc5f36daf6fac61b5bb2faf9e461a6cc91 (diff)
downloadbcm5719-llvm-08dc66eff0c7ad594584a8a6925ef830cd6873a1.tar.gz
bcm5719-llvm-08dc66eff0c7ad594584a8a6925ef830cd6873a1.zip
Re-commit r324489: [DebugInfo] Improvements to representation of enumeration types (PR36168)
Differential Revision: https://reviews.llvm.org/D42734 llvm-svn: 324899
Diffstat (limited to 'llvm/lib/IR/LLVMContextImpl.h')
-rw-r--r--llvm/lib/IR/LLVMContextImpl.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/IR/LLVMContextImpl.h b/llvm/lib/IR/LLVMContextImpl.h
index db7f368230d..c4cd7850f79 100644
--- a/llvm/lib/IR/LLVMContextImpl.h
+++ b/llvm/lib/IR/LLVMContextImpl.h
@@ -354,13 +354,17 @@ template <> struct MDNodeKeyImpl<DISubrange> {
template <> struct MDNodeKeyImpl<DIEnumerator> {
int64_t Value;
MDString *Name;
+ bool IsUnsigned;
- MDNodeKeyImpl(int64_t Value, MDString *Name) : Value(Value), Name(Name) {}
+ MDNodeKeyImpl(int64_t Value, bool IsUnsigned, MDString *Name)
+ : Value(Value), Name(Name), IsUnsigned(IsUnsigned) {}
MDNodeKeyImpl(const DIEnumerator *N)
- : Value(N->getValue()), Name(N->getRawName()) {}
+ : Value(N->getValue()), Name(N->getRawName()),
+ IsUnsigned(N->isUnsigned()) {}
bool isKeyOf(const DIEnumerator *RHS) const {
- return Value == RHS->getValue() && Name == RHS->getRawName();
+ return Value == RHS->getValue() && IsUnsigned == RHS->isUnsigned() &&
+ Name == RHS->getRawName();
}
unsigned getHashValue() const { return hash_combine(Value, Name); }
OpenPOWER on IntegriCloud