[LLVMbugs] [Bug 10598] New: UndefValue::get() returns the same value

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Aug 6 11:39:23 PDT 2011


           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: unassignedbugs at nondot.org
        ReportedBy: viridia at gmail.com
                CC: llvmbugs at cs.uiuc.edu

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

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

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

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