[LLVMbugs] [Bug 10508] New: DenseMapInfo's std::pair instance's second Tombstone is set to be the empty key [patch attached]
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Jul 26 17:52:09 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=10508
Summary: DenseMapInfo's std::pair instance's second Tombstone
is set to be the empty key [patch attached]
Product: new-bugs
Version: 2.9
Platform: PC
OS/Version: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: michael at lunarg.com
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=6948)
--> (http://llvm.org/bugs/attachment.cgi?id=6948)
patch
The DenseMapInfo instance for std::pair's second Tombstone is set to be the
empty key, see below and the attached patch:
template<typename T, typename U>
struct DenseMapInfo<std::pair<T, U> > {
typedef std::pair<T, U> Pair;
typedef DenseMapInfo<T> FirstInfo;
typedef DenseMapInfo<U> SecondInfo;
static inline Pair getEmptyKey() {
return std::make_pair(FirstInfo::getEmptyKey(),
SecondInfo::getEmptyKey());
}
static inline Pair getTombstoneKey() {
return std::make_pair(FirstInfo::getTombstoneKey(),
SecondInfo::getEmptyKey());
I believe the last line should read:
return std::make_pair(FirstInfo::getTombstoneKey(),
SecondInfo::getTombstoneKey());
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list