X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FProgrammersManual.rst;h=1e7e3ac1aea473cfc7449eee1c049637d027dbdf;hb=ec07ff56b988d537fbcd4b16ff65e31c688bf64e;hp=f140cf509d2520289077b9569444dfe456129e96;hpb=a8104c5ab08a4a25c9c9b17642457f185ed7a5db;p=oota-llvm.git diff --git a/docs/ProgrammersManual.rst b/docs/ProgrammersManual.rst index f140cf509d2..1e7e3ac1aea 100644 --- a/docs/ProgrammersManual.rst +++ b/docs/ProgrammersManual.rst @@ -488,6 +488,9 @@ gathered, use the '``-stats``' option: $ opt -stats -mypassname < program.bc > /dev/null ... statistics output ... +Note that in order to use the '``-stats``' option, LLVM must be +compiled with assertions enabled. + When running ``opt`` on a C file from the SPEC benchmark suite, it gives a report that looks like this: @@ -937,7 +940,7 @@ There are a variety of ways to pass around and use strings in C and C++, and LLVM adds a few new options to choose from. Pick the first option on this list that will do what you need, they are ordered according to their relative cost. -Note that is is generally preferred to *not* pass strings around as ``const +Note that it is generally preferred to *not* pass strings around as ``const char*``'s. These have a number of problems, including the fact that they cannot represent embedded nul ("\0") characters, and do not have a length available efficiently. The general replacement for '``const char*``' is @@ -1813,7 +1816,7 @@ chain of ``F``: Function *F = ...; - for (User *U : GV->users()) { + for (User *U : F->users()) { if (Instruction *Inst = dyn_cast(U)) { errs() << "F is used in instruction:\n"; errs() << *Inst << "\n"; @@ -2550,6 +2553,22 @@ section on :ref:`isa and dyn_cast ` and our :doc:`detailed document ` which describes how you can implement this pattern for use with the LLVM helpers. +.. _abi_breaking_checks: + +ABI Breaking Checks +------------------- + +Checks and asserts that alter the LLVM C++ ABI are predicated on the +preprocessor symbol `LLVM_ENABLE_ABI_BREAKING_CHECKS` -- LLVM +libraries built with `LLVM_ENABLE_ABI_BREAKING_CHECKS` are not ABI +compatible LLVM libraries built without it defined. By default, +turning on assertions also turns on `LLVM_ENABLE_ABI_BREAKING_CHECKS` +so a default +Asserts build is not ABI compatible with a +default -Asserts build. Clients that want ABI compatibility +between +Asserts and -Asserts builds should use the CMake or autoconf +build systems to set `LLVM_ENABLE_ABI_BREAKING_CHECKS` independently +of `LLVM_ENABLE_ASSERTIONS`. + .. _coreclasses: The Core LLVM Class Hierarchy Reference @@ -2632,7 +2651,7 @@ Important Derived Types Subclass of SequentialType for vector types. A vector type is similar to an ArrayType but is distinguished because it is a first class type whereas ArrayType is not. Vector types are used for vector operations and are usually - small vectors of of an integer or floating point type. + small vectors of an integer or floating point type. ``StructType`` Subclass of DerivedTypes for struct types.