From 372b8221b74f66affb2916af67fe7fe25121b558 Mon Sep 17 00:00:00 2001 From: Chad Rosier Date: Sun, 26 Feb 2012 21:31:25 +0000 Subject: Remove references to llvm-gcc from overview and tutorial. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151502 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/GettingStarted.html | 39 +++++++++++++-------------------------- 1 file changed, 13 insertions(+), 26 deletions(-) (limited to 'docs') diff --git a/docs/GettingStarted.html b/docs/GettingStarted.html index 7d7e5e5757..9bbb1d5c3a 100644 --- a/docs/GettingStarted.html +++ b/docs/GettingStarted.html @@ -52,7 +52,7 @@
  • An Example Using the LLVM Tool Chain
      -
    1. Example with llvm-gcc4
    2. +
    3. Example with Clang
  • Common Problems
  • Links @@ -84,13 +84,12 @@ basic information.

    suite. This contains all of the tools, libraries, and header files needed to use LLVM. It contains an assembler, disassembler, bitcode analyzer and bitcode optimizer. It also contains basic regression tests that -can be used to test the LLVM tools and the GCC front end.

    +can be used to test the LLVM tools and the Clang front end.

    -

    The second piece is the GCC front end. This component provides a version of -GCC that compiles C and C++ code into LLVM bitcode. Currently, the GCC front -end uses the GCC parser to convert code to LLVM. Once -compiled into LLVM bitcode, a program can be manipulated with the LLVM tools -from the LLVM suite.

    +

    The second piece is the Clang front end. This component compiles C, C++, +Objective C, and Objective C++ code into LLVM bitcode. Once compiled into LLVM +bitcode, a program can be manipulated with the LLVM tools from the LLVM suite. +

    There is a third, optional piece called Test Suite. It is a suite of programs @@ -1721,20 +1720,11 @@ are code generators for parts of LLVM infrastructure.

    -

    This section gives an example of using LLVM. llvm-gcc3 is now obsolete, -so we only include instructions for llvm-gcc4. -

    - -

    Note: The gcc4 frontend's invocation is considerably different -from the previous gcc3 frontend. In particular, the gcc4 frontend does not -create bitcode by default: gcc4 produces native code. As the example below illustrates, -the '--emit-llvm' flag is needed to produce LLVM bitcode output. For makefiles and -configure scripts, the CFLAGS variable needs '--emit-llvm' to produce bitcode -output.

    +

    This section gives an example of using LLVM with the Clang front end.

    - Example with llvm-gcc4 + Example with clang

    @@ -1754,24 +1744,21 @@ int main() {
  • Next, compile the C file into a native executable:

    -
    % llvm-gcc hello.c -o hello
    +
    % clang hello.c -o hello
    -

    Note that llvm-gcc works just like GCC by default. The standard -S and +

    Note that clang works just like GCC by default. The standard -S and -c arguments work as usual (producing a native .s or .o file, respectively).

  • Next, compile the C file into a LLVM bitcode file:

    -
    % llvm-gcc -O3 -emit-llvm hello.c -c -o hello.bc
    +
    % clang -O3 -emit-llvm hello.c -c -o hello.bc

    The -emit-llvm option can be used with the -S or -c options to emit an LLVM ".ll" or ".bc" file (respectively) for the code. This allows you to use the standard LLVM tools on - the bitcode file.

    - -

    Unlike llvm-gcc3, llvm-gcc4 correctly responds to -O[0123] arguments. -

  • + the bitcode file.

  • Run the program in both forms. To run the program, use:

    @@ -1810,7 +1797,7 @@ int main() {
    % ./hello.native
    -

    Note that using llvm-gcc to compile directly to native code (i.e. when +

    Note that using clang to compile directly to native code (i.e. when the -emit-llvm option is not present) does steps 6/7/8 for you.

  • -- cgit v1.2.3