diff --git a/llvm/docs/LangRef.html b/llvm/docs/LangRef.html index 008ae6a67f7f..6ff0f5e7be2d 100644 --- a/llvm/docs/LangRef.html +++ b/llvm/docs/LangRef.html @@ -490,43 +490,43 @@
LLVM programs are composed of "Module"s, each of which is a translation unit - of the input programs. Each module consists of functions, global variables, - and symbol table entries. Modules may be combined together with the LLVM - linker, which merges function (and global variable) definitions, resolves - forward declarations, and merges symbol table entries. Here is an example of - the "hello world" module:
+LLVM programs are composed of Modules, each of which is a + translation unit of the input programs. Each module consists of functions, + global variables, and symbol table entries. Modules may be combined together + with the LLVM linker, which merges function (and global variable) + definitions, resolves forward declarations, and merges symbol table + entries. Here is an example of the "hello world" module:
; Declare the string constant as a global constant. -@.LC0 = internal constant [13 x i8] c"hello world\0A\00" ; [13 x i8]* +@.str = private unnamed_addr constant [13 x i8] c"hello world\0A\00" ; External declaration of the puts function -declare i32 @puts(i8*) ; i32 (i8*)* +declare i32 @puts(i8* nocapture) nounwind ; Definition of main function define i32 @main() { ; i32()* ; Convert [13 x i8]* to i8 *... - %cast210 = getelementptr [13 x i8]* @.LC0, i64 0, i64 0 ; i8* + %cast210 = getelementptr [13 x i8]* @.str, i64 0, i64 0 ; Call puts function to write out the string to stdout. - call i32 @puts(i8* %cast210) ; i32 + call i32 @puts(i8* %cast210) ret i32 0 } ; Named metadata -!1 = metadata !{i32 41} +!1 = metadata !{i32 42} !foo = !{!1, null}
This example is made up of a global variable named - ".LC0", an external declaration of the "puts" function, + ".str", an external declaration of the "puts" function, a function definition for "main" and named metadata - "foo".
+ "foo". -In general, a module is made up of a list of global values, where both - functions and global variables are global values. Global values are +
In general, a module is made up of a list of global values (where both + functions and global variables are global values). Global values are 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 linkage types.