https://bugs.llvm.org/show_bug.cgi?id=32463

            Bug ID: 32463
           Summary: Discrepancy between Language Reference Manual and
                    linker behavior: uniqueing identified types
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Linker
          Assignee: unassignedb...@nondot.org
          Reporter: hardek...@google.com
                CC: llvm-bugs@lists.llvm.org

The language reference manual in section High Level Structure, subsection
Structure Types states: "Literal types are uniqued structurally, but identified
types are never uniqued.". However, the linker does unique structurally
identical identified types.

It would be useful for whole-program analysis if the language reference manual
specification is the intended behavior.

Example:

user:~$ echo '%x = type { i8 } define void @X(%x*) { ret void }' |
llvm/build/bin/llvm-as -o 1.bc

user:~$ echo '%y = type { i8 } define void @Y(%y*) { ret void }' |
llvm/build/bin/llvm-as -o 2.bc

user:~$ llvm/build/bin/llvm-link 1.bc 2.bc -o 3.bc

user:~$ llvm/build/bin/llvm-dis < 3.bc
; ModuleID = '<stdin>'
source_filename = "llvm-link"

%x = type { i8 }

define void @X(%x*) {
  ret void
}

define void @Y(%x*) {
  ret void
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to