[LLVMbugs] [Bug 7105] New: Metadata parsing problem

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun May 9 21:17:36 PDT 2010


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

           Summary: Metadata parsing problem
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: baldrick at free.fr
                CC: llvmbugs at cs.uiuc.edu


Testcase:

define void @foo() {
  call void @llvm.foo(metadata !1, i64 0, metadata !1)
  ret void
}

declare void @llvm.foo(metadata, i64, metadata) nounwind readnone

!named = !{!0}
!0 = metadata !{i8** null}
!1 = metadata !{i8* null}

Running
  llvm-as metadata.ll -o - | llvm-dis
results in

; ModuleID = '<stdin>'

define void @foo() {
  call void @llvm.foo(metadata !-1, i64 0, metadata !-1)
  ret void
}

declare void @llvm.foo(metadata, i64, metadata) nounwind readnone

!named = !{!0}

!0 = metadata !{i8** null}

Notice "metadata ! -1".  Curiously, if llvm.foo is renamed to llvm.dbg.value
then the metadata is parsed properly:

; ModuleID = '<stdin>'

define void @foo() {
  call void @llvm.dbg.value(metadata !1, i64 0, metadata !1)
  ret void
}

declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone

!named = !{!0}

!0 = metadata !{i8** null}
!1 = metadata !{i8* null}

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