<div>I've written a little GUI application that displays an LLVM module as an expandable tree, which can be useful for examining the module's contents. Some features:</div><div><ul><li>Based on wxWidgets, so it's completely cross-platform.</li>

<li>CMake build script can locate both LLVM and wxWidgets installations automatically.</li><li>Loads either .ll or .bc files.</li><li>Supports browsing of LLVM types, variables, functions, aliases, and metadata. I'm working on supporting a more structured view of DWARF DIEs, but that is not complete.</li>

<li>Tree nodes are created lazily as needed.</li><li>The tree node system is highly extensible, each different LLVM object type is represented by a tree node class, adding new node classes is extremely easy.</li><li>The code is very <meta http-equiv="content-type" content="text/html; charset=utf-8">straightforward and easy to read.</li>

<li>All image resources are embedded in the final executable, so the compiles program is just a single binary file, very easily installed.</li></ul></div><div>This is still a work in progress, but I think it's ready for people to start hacking on.</div>

<div><br></div><div>If there is interest, I can check the code into the <a href="http://llvm.org">llvm.org</a> svn somewhere - I just need to know where to put it. Otherwise, I'm happy to email a zip archive to folks who are interested. I'm willing to release the code under whatever license is most convenient.</div>

<div><br></div><div>Here's a screenshot of what it looks like:</div><div><br></div><img src="cid:ii_12e18aa739450dbf" alt="llbrowse.png" title="llbrowse.png"><br clear="all"><br><div>And here's what the node class for displaying variables looks like, as an example:</div>

<div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div><font class="Apple-style-span" face="'courier new', monospace">class VariableItem : public TreeItemBase {</font></div>

</div><div><div><font class="Apple-style-span" face="'courier new', monospace">public:</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace">  VariableItem(const llvm::Module* module, const llvm::GlobalVariable* var)</font></div>

</div><div><div><font class="Apple-style-span" face="'courier new', monospace">    : module_(module), var_(var) {}</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"><br>

</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace">  // Overrides</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div>

</div><div><div><font class="Apple-style-span" face="'courier new', monospace">  int GetIcon() const;</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace">  wxString GetCaption() const;</font></div>

</div><div><div><font class="Apple-style-span" face="'courier new', monospace">  void CreateChildren(wxTreeCtrl* tree, const wxTreeItemId& id);</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace">  bool CanCreateChildren() const;</font></div>

</div><div><div><font class="Apple-style-span" face="'courier new', monospace">  void ShowDetails(DetailsView* detailsView);</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace"><br>

</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace">private:</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace">  const llvm::Module* const module_;</font></div>

</div><div><div><font class="Apple-style-span" face="'courier new', monospace">  const llvm::GlobalVariable* const var_;</font></div></div><div><div><font class="Apple-style-span" face="'courier new', monospace">};</font></div>

</div></blockquote><div><br></div><div>-- <br>-- Talin<br>
</div>