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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to