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


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

Reply via email to