[llvm-dev] llvm-link unifies identified structs?

Robin Sommer via llvm-dev llvm-dev at lists.llvm.org
Wed Jul 27 08:10:47 PDT 2016


The language reference says: "identified [structure] types are never
uniqued". But llvm-link seems to do just that at link-time:

    > cat x.ll

    %A = type {}
    %B = type {}
    %C = type { %A*, %B* }

    define void @foo(%C* %c) {
      ret void
    }

    >  llvm-link x.ll | llvm-dis
    ; ModuleID = '<stdin>'
    source_filename = "llvm-link"

    %C = type { %A*, %A* }
    %A = type {}

    define void @foo(%C* %c) {
        ret void
    }

Does the statement in the language reference not apply to linking?

(This is with a recent 3.9).

Robin

-- 
Robin Sommer * ICSI/LBNL * robin at icir.org * www.icir.org/robin


More information about the llvm-dev mailing list