diff options
Diffstat (limited to 'llvm/docs/ProgrammersManual.rst')
-rw-r--r-- | llvm/docs/ProgrammersManual.rst | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/llvm/docs/ProgrammersManual.rst b/llvm/docs/ProgrammersManual.rst index 88c56700eb3..0903a22fc3e 100644 --- a/llvm/docs/ProgrammersManual.rst +++ b/llvm/docs/ProgrammersManual.rst @@ -2905,37 +2905,6 @@ For example: GV->eraseFromParent(); -.. _create_types: - -How to Create Types -------------------- - -In generating IR, you may need some complex types. If you know these types -statically, you can use ``TypeBuilder<...>::get()``, defined in -``llvm/Support/TypeBuilder.h``, to retrieve them. ``TypeBuilder`` has two forms -depending on whether you're building types for cross-compilation or native -library use. ``TypeBuilder<T, true>`` requires that ``T`` be independent of the -host environment, meaning that it's built out of types from the ``llvm::types`` -(`doxygen <http://llvm.org/doxygen/namespacellvm_1_1types.html>`__) namespace -and pointers, functions, arrays, etc. built of those. ``TypeBuilder<T, false>`` -additionally allows native C types whose size may depend on the host compiler. -For example, - -.. code-block:: c++ - - FunctionType *ft = TypeBuilder<types::i<8>(types::i<32>*), true>::get(); - -is easier to read and write than the equivalent - -.. code-block:: c++ - - std::vector<const Type*> params; - params.push_back(PointerType::getUnqual(Type::Int32Ty)); - FunctionType *ft = FunctionType::get(Type::Int8Ty, params, false); - -See the `class comment -<http://llvm.org/doxygen/TypeBuilder_8h_source.html#l00001>`_ for more details. - .. _threading: Threads and LLVM |