1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

Decribe the "implementation" keyword.

llvm-svn: 28762
This commit is contained in:
Chris Lattner 2006-06-13 03:05:47 +00:00
parent 6f45959365
commit f04cf06b5a

View File

@ -350,6 +350,9 @@ symbol table entries. Here is an example of the "hello world" module:</p>
<i>; External declaration of the puts function</i> <i>; External declaration of the puts function</i>
<a href="#functionstructure">declare</a> int %puts(sbyte*) <i>; int(sbyte*)* </i> <a href="#functionstructure">declare</a> int %puts(sbyte*) <i>; int(sbyte*)* </i>
<i>; Global variable / Function body section separator</i>
implementation
<i>; Definition of main function</i> <i>; Definition of main function</i>
int %main() { <i>; int()* </i> int %main() { <i>; int()* </i>
<i>; Convert [13x sbyte]* to sbyte *...</i> <i>; Convert [13x sbyte]* to sbyte *...</i>
@ -373,6 +376,13 @@ represented by a pointer to a memory location (in this case, a pointer to an
array of char, and a pointer to a function), and have one of the following <a array of char, and a pointer to a function), and have one of the following <a
href="#linkage">linkage types</a>.</p> href="#linkage">linkage types</a>.</p>
<p>Due to a limitation in the current LLVM assembly parser (it is limited by
one-token lookahead), modules are split into two pieces by the "implementation"
keyword. Global variable prototypes and definitions must occur before the
keyword, and function definitions must occur after it. Function prototypes may
occur either before or after it. In the future, the implementation keyword may
become a noop, if the parser gets smarter.</p>
</div> </div>
<!-- ======================================================================= --> <!-- ======================================================================= -->