]> granicus.if.org Git - llvm/commitdiff
Fix LTO document
authorPiotr Padlewski <piotr.padlewski@gmail.com>
Fri, 8 Jul 2016 00:28:29 +0000 (00:28 +0000)
committerPiotr Padlewski <piotr.padlewski@gmail.com>
Fri, 8 Jul 2016 00:28:29 +0000 (00:28 +0000)
Summary: fixed very old document

Reviewers: tejohnson, pcc

Subscribers: mehdi_amini, eraman, llvm-commits

Differential Revision: http://reviews.llvm.org/D22121

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274811 91177308-0d34-0410-b5e6-96231b3b80d8

docs/LinkTimeOptimization.rst

index 55a7486874a31bfca211bc91e34381649a2fb4f4..9c1e5607596bbd5173a722e5ff9cc444a2c7a4da 100644 (file)
@@ -87,9 +87,9 @@ To compile, run:
 
 .. code-block:: console
 
-  % clang -emit-llvm -c a.c -o a.o   # <-- a.o is LLVM bitcode file
+  % clang -flto -c a.c -o a.o        # <-- a.o is LLVM bitcode file
   % clang -c main.c -o main.o        # <-- main.o is native object file
-  % clang a.o main.o -o main         # <-- standard link command without modifications
+  % clang -flto a.o main.o -o main   # <-- standard link command with -flto
 
 * In this example, the linker recognizes that ``foo2()`` is an externally
   visible symbol defined in LLVM bitcode file. The linker completes its usual