We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7733695 commit 32ed56cCopy full SHA for 32ed56c
ir.go
@@ -705,6 +705,14 @@ func (v Value) SetMetadata(kind int, node Metadata) {
705
C.LLVMSetMetadata2(v.C, C.unsigned(kind), node.C)
706
}
707
708
+// Obtain the string value of the instruction. Same as would be printed with
709
+// Value.Dump() (with two spaces at the start but no newline at the end).
710
+func (v Value) String() string {
711
+ cstr := C.LLVMPrintValueToString(v.C)
712
+ defer C.LLVMDisposeMessage(cstr)
713
+ return C.GoString(cstr)
714
+}
715
+
716
// Conversion functions.
717
// Return the input value if it is an instance of the specified class, otherwise NULL.
718
// See llvm::dyn_cast_or_null<>.
0 commit comments