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

           Summary: UndefValue::get() returns the same value
           Product: libraries
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: Core LLVM classes
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


I thought that the way UndefValue::get() was supposed to work is that it
returned a different instance each time you called get() - but what I am seeing
is that if I call multiple times with the same type, it returns the same
object.

I realize that I could be misunderstanding how UndefValue is supposed to work
in the new type system - one difficulty that I've been having a lot lately is
that when something breaks, I don't know whether the breakage is intentional or
not.

However, the current behavior doesn't seem very useful, and breaks a lot of my
code. I normally use UndefValue to create placeholders in constants which will
be filled in later, but with the current behavior all placeholders are the
same.

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