[LLVMbugs] [Bug 9499] New: Bug with FastFoldingSetNode / FoldingSetNodeID::Add

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Mar 17 03:48:55 PDT 2011


http://llvm.org/bugs/show_bug.cgi?id=9499

           Summary: Bug with FastFoldingSetNode / FoldingSetNodeID::Add
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Support Libraries
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: schaub.johannes at googlemail.com
                CC: llvmbugs at cs.uiuc.edu


There's a problem with interaction of those two functions.
FoldingSetNodeID::Add is supposed to add data to a folding set node ID.
However, when we add folding set node that derives from FastFoldingSetNode, its
profile function will overwrite anything that has been added previously to the
folding set node ID:

  // FoldingSetNodeID::Add
  template <typename T>
  inline void Add(const T& x) { FoldingSetTrait<T>::Profile(x, *this); }

  // FastFoldingSetNode::Profile
  void Profile(FoldingSetNodeID& ID) const { ID = FastID; }

I think that FoldingSetNodeID::Add should let the Profile function add stuff to
a temporary folding set node id and then append all collected data to "*this".

-- 
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