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: [email protected]
ReportedBy: [email protected]
CC: [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs