diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-10 01:59:57 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-10 01:59:57 +0000 |
commit | bd33d375f08851b774655b2256c03ee707ec49b0 (patch) | |
tree | 2562a0bd5cda6e13bc8f6dcbbfb88fd91eb79cda /llvm/lib/IR/LLVMContextImpl.h | |
parent | e977a8c747b79affdc5870f7e7c476c33800559b (diff) | |
download | bcm5719-llvm-bd33d375f08851b774655b2256c03ee707ec49b0.tar.gz bcm5719-llvm-bd33d375f08851b774655b2256c03ee707ec49b0.zip |
IR: Remove unnecessary fields from MDTemplateParameter
I noticed this fields were never used in r228607, but I neglected to
propagate that into `MDTemplateParameter` until now. This really should
have been done before commit in r228640; sorry for the churn.
llvm-svn: 228652
Diffstat (limited to 'llvm/lib/IR/LLVMContextImpl.h')
-rw-r--r-- | llvm/lib/IR/LLVMContextImpl.h | 35 |
1 files changed, 10 insertions, 25 deletions
diff --git a/llvm/lib/IR/LLVMContextImpl.h b/llvm/lib/IR/LLVMContextImpl.h index 6a3d59289f4..824c4322351 100644 --- a/llvm/lib/IR/LLVMContextImpl.h +++ b/llvm/lib/IR/LLVMContextImpl.h @@ -649,26 +649,17 @@ template <> struct MDNodeKeyImpl<MDTemplateTypeParameter> { Metadata *Scope; StringRef Name; Metadata *Type; - Metadata *File; - unsigned Line; - unsigned Column; - MDNodeKeyImpl(Metadata *Scope, StringRef Name, Metadata *Type, Metadata *File, - unsigned Line, unsigned Column) - : Scope(Scope), Name(Name), Type(Type), File(File), Line(Line), - Column(Column) {} + MDNodeKeyImpl(Metadata *Scope, StringRef Name, Metadata *Type) + : Scope(Scope), Name(Name), Type(Type) {} MDNodeKeyImpl(const MDTemplateTypeParameter *N) - : Scope(N->getScope()), Name(N->getName()), Type(N->getType()), - File(N->getFile()), Line(N->getLine()), Column(N->getColumn()) {} + : Scope(N->getScope()), Name(N->getName()), Type(N->getType()) {} bool isKeyOf(const MDTemplateTypeParameter *RHS) const { return Scope == RHS->getScope() && Name == RHS->getName() && - Type == RHS->getType() && File == RHS->getFile() && - Line == RHS->getLine() && Column == RHS->getColumn(); - } - unsigned getHashValue() const { - return hash_combine(Scope, Name, Type, File, Line, Column); + Type == RHS->getType(); } + unsigned getHashValue() const { return hash_combine(Scope, Name, Type); } }; template <> struct MDNodeKeyImpl<MDTemplateValueParameter> { @@ -677,27 +668,21 @@ template <> struct MDNodeKeyImpl<MDTemplateValueParameter> { StringRef Name; Metadata *Type; Metadata *Value; - Metadata *File; - unsigned Line; - unsigned Column; MDNodeKeyImpl(unsigned Tag, Metadata *Scope, StringRef Name, Metadata *Type, - Metadata *Value, Metadata *File, unsigned Line, unsigned Column) - : Tag(Tag), Scope(Scope), Name(Name), Type(Type), Value(Value), - File(File), Line(Line), Column(Column) {} + Metadata *Value) + : Tag(Tag), Scope(Scope), Name(Name), Type(Type), Value(Value) {} MDNodeKeyImpl(const MDTemplateValueParameter *N) : Tag(N->getTag()), Scope(N->getScope()), Name(N->getName()), - Type(N->getType()), Value(N->getValue()), File(N->getFile()), - Line(N->getLine()), Column(N->getColumn()) {} + Type(N->getType()), Value(N->getValue()) {} bool isKeyOf(const MDTemplateValueParameter *RHS) const { return Tag == RHS->getTag() && Scope == RHS->getScope() && Name == RHS->getName() && Type == RHS->getType() && - Value == RHS->getValue() && File == RHS->getFile() && - Line == RHS->getLine() && Column == RHS->getColumn(); + Value == RHS->getValue(); } unsigned getHashValue() const { - return hash_combine(Tag, Scope, Name, Type, Value, File, Line, Column); + return hash_combine(Tag, Scope, Name, Type, Value); } }; |