mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 06:25:18 +00:00
DebugInfo: Use MDTypeRef throughout the hierarchy
Use `MDTypeRef` (etc.) in the new debug info hierarchy rather than raw `Metadata *` pointers. I rolled in a change to `DIBuilder` that looks unrelated: take `DIType` instead of `DITypeRef` as type arguments when creating variables. However, this was the simplest way to use `MDTypeRef` within the functions, and didn't require any cleanups from callers in clang (since they were all passing in `DIType`s anyway, relying on their implicit conversions to `DITypeRef`). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234197 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -653,10 +653,10 @@ template <> struct MDNodeKeyImpl<MDTemplateTypeParameter> {
|
||||
|
||||
MDNodeKeyImpl(StringRef Name, Metadata *Type) : Name(Name), Type(Type) {}
|
||||
MDNodeKeyImpl(const MDTemplateTypeParameter *N)
|
||||
: Name(N->getName()), Type(N->getType()) {}
|
||||
: Name(N->getName()), Type(N->getRawType()) {}
|
||||
|
||||
bool isKeyOf(const MDTemplateTypeParameter *RHS) const {
|
||||
return Name == RHS->getName() && Type == RHS->getType();
|
||||
return Name == RHS->getName() && Type == RHS->getRawType();
|
||||
}
|
||||
unsigned getHashValue() const { return hash_combine(Name, Type); }
|
||||
};
|
||||
@@ -670,12 +670,12 @@ template <> struct MDNodeKeyImpl<MDTemplateValueParameter> {
|
||||
MDNodeKeyImpl(unsigned Tag, StringRef Name, Metadata *Type, Metadata *Value)
|
||||
: Tag(Tag), Name(Name), Type(Type), Value(Value) {}
|
||||
MDNodeKeyImpl(const MDTemplateValueParameter *N)
|
||||
: Tag(N->getTag()), Name(N->getName()), Type(N->getType()),
|
||||
: Tag(N->getTag()), Name(N->getName()), Type(N->getRawType()),
|
||||
Value(N->getValue()) {}
|
||||
|
||||
bool isKeyOf(const MDTemplateValueParameter *RHS) const {
|
||||
return Tag == RHS->getTag() && Name == RHS->getName() &&
|
||||
Type == RHS->getType() && Value == RHS->getValue();
|
||||
Type == RHS->getRawType() && Value == RHS->getValue();
|
||||
}
|
||||
unsigned getHashValue() const { return hash_combine(Tag, Name, Type, Value); }
|
||||
};
|
||||
|
Reference in New Issue
Block a user