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

            Bug ID: 40772
           Summary: Access metadata via Go binding API.
           Product: libraries
           Version: trunk
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Core LLVM classes
          Assignee: unassignedb...@nondot.org
          Reporter: m...@wud.me
                CC: llvm-bugs@lists.llvm.org

I am writing a compiler using Go, and need to save some Type Information of
current source code, which can be used while compiling other source files. Go
binding have some method e.g. 

func (m Module) AddNamedMetadataOperand(name string, operand Metadata)
func (v Value) SetMetadata(kind int, node Metadata)

to write Metadata, but no function to read it.

func (v Value) Metadata(kind int) (rv Value)

just returns an llvm.Value that I cannot access it as String, only I can do is
call Dump() method and redirect the output to a buffer, and parse it by myself.

Could you offer some method like 

func (m Module) GetNamedMetadataOperand(name string)
or
func (v Value) GetMDString(kind int)?

that can access Metadata easier?

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

Reply via email to