diff options
Diffstat (limited to 'docs/SystemLibrary.html')
-rw-r--r-- | docs/SystemLibrary.html | 84 |
1 files changed, 40 insertions, 44 deletions
diff --git a/docs/SystemLibrary.html b/docs/SystemLibrary.html index b81b1a80d25d..57dc2391d535 100644 --- a/docs/SystemLibrary.html +++ b/docs/SystemLibrary.html @@ -7,7 +7,7 @@ </head> <body> -<div class="doc_title">System Library</div> +<h1>System Library</h1> <ul> <li><a href="#abstract">Abstract</a></li> <li><a href="#requirements">Keeping LLVM Portable</a> @@ -36,8 +36,8 @@ <!-- *********************************************************************** --> -<div class="doc_section"><a name="abstract">Abstract</a></div> -<div class="doc_text"> +<h2><a name="abstract">Abstract</a></h2> +<div> <p>This document provides some details on LLVM's System Library, located in the source at <tt>lib/System</tt> and <tt>include/llvm/System</tt>. The library's purpose is to shield LLVM from the differences between operating @@ -63,21 +63,19 @@ </div> <!-- *********************************************************************** --> -<div class="doc_section"> +<h2> <a name="requirements">Keeping LLVM Portable</a> -</div> -<div class="doc_text"> +</h2> +<div> <p>In order to keep LLVM portable, LLVM developers should adhere to a set of portability rules associated with the System Library. Adherence to these rules should help the System Library achieve its goal of shielding LLVM from the variations in operating system interfaces and doing so efficiently. The following sections define the rules needed to fulfill this objective.</p> -</div> <!-- ======================================================================= --> -<div class="doc_subsection"><a name="headers">Don't Include System Headers</a> -</div> -<div class="doc_text"> +<h3><a name="headers">Don't Include System Headers</a></h3> +<div> <p>Except in <tt>lib/System</tt>, no LLVM source code should directly <tt>#include</tt> a system header. Care has been taken to remove all such <tt>#includes</tt> from LLVM while <tt>lib/System</tt> was being @@ -91,9 +89,8 @@ </div> <!-- ======================================================================= --> -<div class="doc_subsection"><a name="expose">Don't Expose System Headers</a> -</div> -<div class="doc_text"> +<h3><a name="expose">Don't Expose System Headers</a></h3> +<div> <p>The System Library must shield LLVM from <em>all</em> system headers. To obtain system level functionality, LLVM source must <tt>#include "llvm/System/Thing.h"</tt> and nothing else. This means that @@ -103,8 +100,8 @@ </div> <!-- ======================================================================= --> -<div class="doc_subsection"><a name="c_headers">Use Standard C Headers</a></div> -<div class="doc_text"> +<h3><a name="c_headers">Use Standard C Headers</a></h3> +<div> <p>The <em>standard</em> C headers (the ones beginning with "c") are allowed to be exposed through the <tt>lib/System</tt> interface. These headers and the things they declare are considered to be platform agnostic. LLVM source @@ -113,9 +110,8 @@ </div> <!-- ======================================================================= --> -<div class="doc_subsection"><a name="cpp_headers">Use Standard C++ Headers</a> -</div> -<div class="doc_text"> +<h3><a name="cpp_headers">Use Standard C++ Headers</a></h3> +<div> <p>The <em>standard</em> C++ headers from the standard C++ library and standard template library may be exposed through the <tt>lib/System</tt> interface. These headers and the things they declare are considered to be @@ -124,8 +120,8 @@ </div> <!-- ======================================================================= --> -<div class="doc_subsection"><a name="highlev">High Level Interface</a></div> -<div class="doc_text"> +<h3><a name="highlev">High Level Interface</a></h3> +<div> <p>The entry points specified in the interface of lib/System must be aimed at completing some reasonably high level task needed by LLVM. We do not want to simply wrap each operating system call. It would be preferable to wrap several @@ -143,8 +139,8 @@ </div> <!-- ======================================================================= --> -<div class="doc_subsection"><a name="nounused">No Unused Functionality</a></div> -<div class="doc_text"> +<h3><a name="nounused">No Unused Functionality</a></h3> +<div> <p>There must be no functionality specified in the interface of lib/System that isn't actually used by LLVM. We're not writing a general purpose operating system wrapper here, just enough to satisfy LLVM's needs. And, LLVM @@ -153,9 +149,8 @@ </div> <!-- ======================================================================= --> -<div class="doc_subsection"><a name="nodupl">No Duplicate Implementations</a> -</div> -<div class="doc_text"> +<h3><a name="nodupl">No Duplicate Implementations</a></h3> +<div> <p>The implementation of a function for a given platform must be written exactly once. This implies that it must be possible to apply a function's implementation to multiple operating systems if those operating systems can @@ -165,8 +160,8 @@ </div> <!-- ======================================================================= --> -<div class="doc_subsection"><a name="virtuals">No Virtual Methods</a></div> -<div class="doc_text"> +<h3><a name="virtuals">No Virtual Methods</a></h3> +<div> <p>The System Library interfaces can be called quite frequently by LLVM. In order to make those calls as efficient as possible, we discourage the use of virtual methods. There is no need to use inheritance for implementation @@ -175,8 +170,8 @@ </div> <!-- ======================================================================= --> -<div class="doc_subsection"><a name="nofunc">No Exposed Functions</a></div> -<div class="doc_text"> +<h3><a name="nofunc">No Exposed Functions</a></h3> +<div> <p>Any functions defined by system libraries (i.e. not defined by lib/System) must not be exposed through the lib/System interface, even if the header file for that function is not exposed. This prevents inadvertent use of system @@ -191,8 +186,8 @@ </div> <!-- ======================================================================= --> -<div class="doc_subsection"><a name="nodata">No Exposed Data</a></div> -<div class="doc_text"> +<h3><a name="nodata">No Exposed Data</a></h3> +<div> <p>Any data defined by system libraries (i.e. not defined by lib/System) must not be exposed through the lib/System interface, even if the header file for that function is not exposed. As with functions, this prevents inadvertent use @@ -200,8 +195,8 @@ </div> <!-- ======================================================================= --> -<div class="doc_subsection"><a name="softerrors">Minimize Soft Errors</a></div> -<div class="doc_text"> +<h3><a name="softerrors">Minimize Soft Errors</a></h3> +<div> <p>Operating system interfaces will generally provide error results for every little thing that could go wrong. In almost all cases, you can divide these error results into two groups: normal/good/soft and abnormal/bad/hard. That @@ -239,9 +234,8 @@ </div> <!-- ======================================================================= --> -<div class="doc_subsection"><a name="throw_spec">No throw Specifications</a> -</div> -<div class="doc_text"> +<h3><a name="throw_spec">No throw Specifications</a></h3> +<div> <p>None of the lib/System interface functions may be declared with C++ <tt>throw()</tt> specifications on them. This requirement makes sure that the compiler does not insert additional exception handling code into the interface @@ -252,8 +246,8 @@ </div> <!-- ======================================================================= --> -<div class="doc_subsection"><a name="organization">Code Organization</a></div> -<div class="doc_text"> +<h3><a name="organization">Code Organization</a></h3> +<div> <p>Implementations of the System Library interface are separated by their general class of operating system. Currently only Unix and Win32 classes are defined but more could be added for other operating system classifications. @@ -281,8 +275,8 @@ </div> <!-- ======================================================================= --> -<div class="doc_subsection"><a name="semantics">Consistent Semantics</a></div> -<div class="doc_text"> +<h3><a name="semantics">Consistent Semantics</a></h3> +<div> <p>The implementation of a lib/System interface can vary drastically between platforms. That's okay as long as the end result of the interface function is the same. For example, a function to create a directory is pretty straight @@ -296,12 +290,14 @@ </div> <!-- ======================================================================= --> -<div class="doc_subsection"><a name="bug">Bug 351</a></div> -<div class="doc_text"> +<h3><a name="bug">Bug 351</a></h3> +<div> <p>See <a href="http://llvm.org/PR351">bug 351</a> for further details on the progress of this work</p> </div> +</div> + <!-- *********************************************************************** --> <hr> @@ -312,8 +308,8 @@ src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"></a> <a href="mailto:rspencer@x10sys.com">Reid Spencer</a><br> - <a href="http://llvm.org">LLVM Compiler Infrastructure</a><br> - Last modified: $Date: 2010-05-07 02:28:04 +0200 (Fri, 07 May 2010) $ + <a href="http://llvm.org/">LLVM Compiler Infrastructure</a><br> + Last modified: $Date: 2011-04-23 02:30:22 +0200 (Sat, 23 Apr 2011) $ </address> </body> </html> |