[cfe-commits] r59270 - in /cfe/trunk/www: hacking.html menu.html.incl
Daniel Dunbar
daniel at zuster.org
Thu Nov 13 14:49:42 PST 2008
Author: ddunbar
Date: Thu Nov 13 16:49:41 2008
New Revision: 59270
URL: http://llvm.org/viewvc/llvm-project?rev=59270&view=rev
Log:
Start a "hacking" page with some simple notes on getting started
developing clang.
Added:
cfe/trunk/www/hacking.html
Modified:
cfe/trunk/www/menu.html.incl
Added: cfe/trunk/www/hacking.html
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/www/hacking.html?rev=59270&view=auto
==============================================================================
--- cfe/trunk/www/hacking.html (added)
+++ cfe/trunk/www/hacking.html Thu Nov 13 16:49:41 2008
@@ -0,0 +1,82 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
+<html>
+<head>
+ <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+ <title>Hacking on clang</title>
+ <link type="text/css" rel="stylesheet" href="menu.css" />
+ <link type="text/css" rel="stylesheet" href="content.css" />
+</head>
+<body>
+<!--#include virtual="menu.html.incl"-->
+<div id="content">
+ <!--*********************************************************************-->
+ <h1>Hacking on Clang</h1>
+ <!--*********************************************************************-->
+
+ <p>This document provides some hints for how to get started hacking
+ on Clang for developers who are new to the Clang and/or LLVM
+ codebases.
+ <ul>
+ <li><a href="#docs">Developer Documentation</a></li>
+ <li><a href="#debugging">Debugging</a></li>
+ <li><a href="#irgen">LLVM IR Generation</a></li>
+ </ul>
+ </p>
+
+ <!--=====================================================================-->
+ <h2 id="debugging">Developer Documentation</h2>
+ <!--=====================================================================-->
+
+ <p>Both Clang and LLVM use doxygen to provide API documentation. Their
+ respective web pages (generated nightly) are here:
+ <ul>
+ <li><a href="http://clang.llvm.org/doxygen">Clang</a></li>
+ <li><a href="http://llvm.org/doxygen">LLVM</a></li>
+ </ul>
+ </p>
+
+ <p>For work on the LLVM IR generation, the LLVM assembly language
+ <a href="http://llvm.org/docs/LangRef.html">reference manual</a> is
+ also useful.</p>
+
+ <!--=====================================================================-->
+ <h2 id="debugging">Debugging</h2>
+ <!--=====================================================================-->
+
+ <p>Inspecting data structures in a debugger:
+ <ul>
+ <li>Many LLVM and Clang data structures provide
+ a <tt>dump()</tt> method which will print a description of the
+ data structure to <tt>stderr</tt>.</li>
+ <li>The <a href="docs/InternalsManual.html#QualType"><tt>QualType</tt></a>
+ structure is used pervasively. This is a simple value class for
+ wrapping types with qualifiers; you can use
+ the <tt>isConstQualified()</tt>, for example, to get one of the
+ qualifiers, and the <tt>getTypePtr()</tt> method to get the
+ wrapped <tt>Type*</tt> which you can then dump.</li>
+ </ul>
+ </p>
+
+ <!--=====================================================================-->
+ <h2 id="irgen">LLVM IR Generation</h2>
+ <!--=====================================================================-->
+
+ <p>The LLVM IR generation part of clang handles conversion of the
+ AST nodes output by the Sema module to the LLVM Intermediate
+ Representation (IR). Historically, this was referred to as
+ "codegen", and the Clang code for this lives
+ in <tt>lib/CodeGen</tt>.</p>
+
+ <p>The output is most easily inspected using the <tt>-emit-llvm</tt>
+ option to clang (possibly in conjunction with <tt>-o -</tt>). You
+ can also use <tt>-emit-llvm-bc</tt> to write an LLVM bitcode file
+ which can be processed by the suite of LLVM tools
+ like <tt>llvm-dis</tt>, <tt>llvm-nm</tt>, etc. See the LLVM
+ <a href="http://llvm.org/docs/CommandGuide/">Command Guide</tt>
+ for more information.</p>
+
+</div>
+</body>
+</html>
Modified: cfe/trunk/www/menu.html.incl
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/www/menu.html.incl?rev=59270&r1=59269&r2=59270&view=diff
==============================================================================
--- cfe/trunk/www/menu.html.incl (original)
+++ cfe/trunk/www/menu.html.incl Thu Nov 13 16:49:41 2008
@@ -12,6 +12,7 @@
<a href="/get_involved.html">Get Involved</a>
<a href="/cxx_status.html">C++ Status</a>
<a href="/docs/InternalsManual.html">Clang Internals</a>
+ <a href="/hacking.html">Hacking on Clang</a>
<a href="/performance.html">Performance</a>
</div>
More information about the cfe-commits
mailing list