<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi Dan, <div><br></div><div>I am not against adding multi-line support for Metadata. I am also okay with your syntax, and I am also okay with other solutions, such as escaping of \n’s or adopting c-style concatenations of strings on multiple lines.  But I think that serialization of MachineFunction should not be done in metadata. I understand the problem that you pointer out that machine instructions refer to LLVM-IR, but I don’t think that metadata is the right container for them. </div><div><br></div><div>Nadav</div><div><br><div><div>On Jun 26, 2013, at 3:29 PM, Dan Gohman <<a href="mailto:dan433584@gmail.com">dan433584@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div dir="ltr"><div>Hello,</div><div><br></div><div>I propose a new syntax for metadata strings (MDStrings) which would allow string data to be spread over multiple lines:</div><div><br></div><div>!0 = metadata !{metadata !"""</div><div>hello</div><div>world</div><div>"""}</div><div><br></div><div>The special three-quote sequence marks the beginning and end of a multi-line string.</div><div><br></div><div>This syntax could have a variety of uses, but of particular interest is that it could be used as a basis for serializing MachineFunctions. MachineFunctions are not an entirely self-contained IR; they contain references to LLVM IR. As such, a serialization of a MachineFunction needs to have an LLVM Module to refer to. By encoding MachineFunctions in metadata, they can easily accompany an LLVM Module. By being multi-line, the data could be made to be reasonably human-readable and human-editable.</div><div><br></div><div>Attached is a simple proof-of-concept patch which implements parsing and printing for this new MDString syntax.</div><div><br></div><div>Comments welcome!</div><div><br></div><div>Dan</div><div><br></div></div><span><extended-mdstring-syntax.patch></span>_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a><span class="Apple-converted-space"> </span>        <a href="http://llvm.cs.uiuc.edu/">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a></div></blockquote></div><br></div></body></html>