Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/trunk/lib/IR/LLVMContextImpl.h
Show First 20 Lines • Show All 274 Lines • ▼ Show 20 Lines | |||||
}; | }; | ||||
/// DenseMapInfo for DILocation. | /// DenseMapInfo for DILocation. | ||||
template <> struct MDNodeKeyImpl<DILocation> { | template <> struct MDNodeKeyImpl<DILocation> { | ||||
unsigned Line; | unsigned Line; | ||||
unsigned Column; | unsigned Column; | ||||
Metadata *Scope; | Metadata *Scope; | ||||
Metadata *InlinedAt; | Metadata *InlinedAt; | ||||
bool ImplicitCode; | |||||
MDNodeKeyImpl(unsigned Line, unsigned Column, Metadata *Scope, | MDNodeKeyImpl(unsigned Line, unsigned Column, Metadata *Scope, | ||||
Metadata *InlinedAt) | Metadata *InlinedAt, bool ImplicitCode) | ||||
: Line(Line), Column(Column), Scope(Scope), InlinedAt(InlinedAt) {} | : Line(Line), Column(Column), Scope(Scope), InlinedAt(InlinedAt), | ||||
ImplicitCode(ImplicitCode) {} | |||||
MDNodeKeyImpl(const DILocation *L) | MDNodeKeyImpl(const DILocation *L) | ||||
: Line(L->getLine()), Column(L->getColumn()), Scope(L->getRawScope()), | : Line(L->getLine()), Column(L->getColumn()), Scope(L->getRawScope()), | ||||
InlinedAt(L->getRawInlinedAt()) {} | InlinedAt(L->getRawInlinedAt()), ImplicitCode(L->isImplicitCode()) {} | ||||
bool isKeyOf(const DILocation *RHS) const { | bool isKeyOf(const DILocation *RHS) const { | ||||
return Line == RHS->getLine() && Column == RHS->getColumn() && | return Line == RHS->getLine() && Column == RHS->getColumn() && | ||||
Scope == RHS->getRawScope() && InlinedAt == RHS->getRawInlinedAt(); | Scope == RHS->getRawScope() && InlinedAt == RHS->getRawInlinedAt() && | ||||
ImplicitCode == RHS->isImplicitCode(); | |||||
} | } | ||||
unsigned getHashValue() const { | unsigned getHashValue() const { | ||||
return hash_combine(Line, Column, Scope, InlinedAt); | return hash_combine(Line, Column, Scope, InlinedAt, ImplicitCode); | ||||
} | } | ||||
}; | }; | ||||
/// DenseMapInfo for GenericDINode. | /// DenseMapInfo for GenericDINode. | ||||
template <> struct MDNodeKeyImpl<GenericDINode> : MDNodeOpsKey { | template <> struct MDNodeKeyImpl<GenericDINode> : MDNodeOpsKey { | ||||
unsigned Tag; | unsigned Tag; | ||||
MDString *Header; | MDString *Header; | ||||
▲ Show 20 Lines • Show All 1,098 Lines • Show Last 20 Lines |