<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Oct 19, 2010, at 10:04 AM, Jim Grosbach wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi Alex,<br><br>That sounds like the sort of information that should be extractable from the debug information metadata. Once you're in LLVM IR, things like class names and source types are not guaranteed to be preserved in a reverse-mappable sort of way (from IR names to source names) in the IR itself. The debug information, however, is intended to do exactly that.<font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#144FAE"><br></font></font></div></blockquote><div><br></div>Yes, you can do something like</div><div><br></div><div>!1 = metadata !"my_special_path1"<br>!2 = metadata !"my_special_pathABC"</div><div><br></div><div>!CIL_special_strings = !{!1, !2}</div><div><br></div><div>Now CIL_Special_strings will stay in llvm::Module till the end.</div><div>-</div><div>Devang</div><div><br><blockquote type="cite"><div>-Jim<br><br><br>On Oct 19, 2010, at 12:52 AM, Alexander Herz wrote:<br><br><blockquote type="cite">Hi,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">we use the llvm to lower c++ code to c code which can be run through our abstract interpretation framework<br></blockquote><blockquote type="cite">(based on CIL). Along with the c code we emit some structured text files that contain the "lost" information<br></blockquote><blockquote type="cite">(class hierarchy, private/public attributes etc). In order to output this information in a sensible way we need to pass unix paths and some more case sensitive information (class names) to the backend (which is derived from the c backend).<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Alex<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On 10/18/2010 07:13 PM, Jim Grosbach wrote:<br></blockquote><blockquote type="cite"><blockquote type="cite">On Oct 18, 2010, at 8:31 AM, Alexander Herz wrote:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">we're writing a new target backend (based on the c backend) for the<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">llvm. We need to pass case sensitive strings from the command line to<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">the backend (unix paths). Currently we're using the Subtarget features<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">string to relay the information.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">It turns out that the llvm applies a to_lower to the this string, so<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">unix paths become basically useless.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Is there a better way to pass this information to the backend. If not,<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">what are the chances that a patch that disables the conversion to lower<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">case for this string is accepted?<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Hi Alex,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Whether there's a better way to pass the information you want to the backend will likely depend a bit more on the specifics of what you're trying to do. Can you elaborate a bit with a simple example, perhaps?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">-Jim<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><br></div></blockquote></div><br></body></html>