Lines Matching +defs:list +defs:string

195 Although LLVM generally does not do much string manipulation, we do have several
202 char *``, and taking a ``const std::string&`` requires clients to perform a heap
211 The ``StringRef`` data type represents a reference to a constant string (a
213 ``std::string``, but does not require heap allocation.
215 It can be implicitly constructed using a C style null-terminated string, an
216 ``std::string``, or explicitly with a character pointer and length. For
228 Map.find(std::string("bar")); // Lookup "bar"
231 Similarly, APIs which need to return a string may return a ``StringRef``
232 instance, which can be used directly or converted to an ``std::string`` using
259 ``std::string``, or a ``StringRef``). The twine delays the actual concatenation
262 allocation involved in constructing the temporary results of string
276 While LLVM doesn't necessarily do a lot of string manipulation and parsing, it
277 does do a lot of string formatting. From diagnostic messages, to llvm tool
279 LLDB runtime logging, the need for string formatting is pervasive.
294 A call to ``formatv`` involves a single **format string** consisting of 0 or more
295 **replacement sequences**, followed by a variable length list of **replacement values**.
296 A replacement sequence is a string of the form ``{N[[,align]:style]}``.
298 ``N`` refers to the 0-based index of the argument from the list of replacement
302 ``align`` is an optional string specifying the width of the field to format
308 ``style`` is an optional string consisting of a type specific that controls the
331 std::string S = formatv("{0}", X);
354 std::string S = formatv("{0}", anything::format_int_custom(42));
373 std::string S;
374 // Simple formatting of basic types and implicit string conversion.
487 std::string Path;
651 a variadic list of "handlers", each of which must be a callable type (a
658 Since the list of handlers passed to ``handleErrors`` may not cover every error
677 In cases where you truly know that the handler list is exhaustive the
682 elsewhere in the program can easily turn a formerly exhaustive list of errors
683 into a non-exhaustive list, risking unexpected program termination. Where
702 environment. In this case representing the error as a string makes perfect
704 arguments: A string error message, and an equivalent ``std::error_code`` for
821 preceded by a string "banner" that can be set by calling the setBanner method. A
828 ExitOnErr.setBanner(std::string(argv[0]) + " error:");
973 which holds a list of user defined errors. The ``handleErrors`` routine
1104 ``std::string``.
1221 use the same string, they will all be turned on when the name is specified.
1389 A more general utility is provided in `llvm/tools/reduce-chunk-list/reduce-chunk-list.cpp` to minimize debug counter chunks lists.
1391 How to use reduce-chunk-list:
1402 Than Find the minimum set of chunks that is interesting, with `reduce-chunk-list`.
1411 Than run `reduce-chunk-list my-script.sh 0-5678 2>&1 | tee dump_bisect`
1494 * a :ref:`string <ds_string>` container is a specialized sequential container or
1513 Sequential Containers (std::vector, std::list, etc)
1525 accepts a sequential list of elements in memory and just reads from them. By
1725 properties, but it also provides efficient access to the front of the list. It
1734 <list>
1737 ``std::list`` is an extremely inefficient class that is rarely useful. It
1740 ``std::list`` also only supports bidirectional iteration, not random access
1743 In exchange for this high cost, std::list supports efficient access to both ends
1744 of the list (like ``std::deque``, but unlike ``std::vector`` or
1746 std::list are stronger than that of a vector class: inserting or removing an
1747 element into the list does not invalidate iterator or pointers to other elements
1748 in the list.
1755 ``ilist<T>`` implements an 'intrusive' doubly-linked list. It is intrusive,
1757 pointers for the list.
1759 ``ilist`` has the same drawbacks as ``std::list``, and additionally requires an
1763 list, and ``ilist``\ s are guaranteed to support a constant-time splice
1842 along with the intrusive list, which serves as the ``end`` iterator, providing
1870 Other STL containers are available, such as ``std::string``.
1882 LLVM adds a few new options to choose from. Pick the first option on this list
1891 For more information on choosing string containers for APIs, please see
1908 either because they are C string literals, std::string, a C array, or a
1912 StringRef has a few major limitations which make more powerful string containers
1919 #. StringRef doesn't own or keep alive the underlying string bytes.
1921 embedding in datastructures in most cases (instead, use an std::string or
1925 method if the method "computes" the result string. Instead, use std::string.
1927 #. StringRef's do not allow you to mutate the pointed-to string bytes and it
1934 into some string that it owns.
1942 string that can be constructed inline with a series of concatenations. Twine
1956 This example forms a string like "blarg.42" by concatenating the values
1974 are much more efficient than intermediate std::string temporaries, and they work
1986 it is very safe to use and supports full mutation of the string.
1997 std::string
2000 The standard C++ std::string class is a very general class that (like
2001 SmallString) owns its underlying data. sizeof(std::string) is very reasonable
2003 other hand, std::string is highly inefficient for inline editing (e.g.
2006 standard library (e.g. libc++ and MSVC provide a highly optimized string class,
2009 The major disadvantage of std::string is that almost every operation that makes
2011 SmallVector or Twine as a scratch buffer, but then use std::string to persist
2294 length. The string data (key) and the element object (value) are stored in the
2295 same allocation with the string data immediately after the element object.
2296 This container guarantees the "``(char*)(&Value+1)``" points to the key string
2304 table, and each pair in the map is store in a single allocation (the string data
2308 copies a string if a value is inserted into the table.
2744 Easy, isn't it? You can also use ``InstIterator``\ s to fill a work list with
2745 its initial contents. For example, if you wanted to initialize a work list to
2849 which ``User``\ s use the ``Value``. The list of all ``User``\ s of a particular
2867 ``Value``\ s are used by it. The list of all ``Value``\ s used by a ``User`` is
2967 * Insertion into the instruction list of the ``BasicBlock``
3527 linker. The ``Module`` class keeps track of a list of :ref:`Function
3528 <c_Function>`\ s, a list of GlobalVariable_\ s, and a SymbolTable_.
3537 * ``Module::Module(std::string name = "")``
3542 * | ``Module::iterator`` - Typedef for function list iterator
3547 ``Module`` object's :ref:`Function <c_Function>` list.
3551 Returns the list of :ref:`Function <c_Function>`\ s. This is necessary to use
3552 when you need to update the list or perform a complex action that doesn't have
3557 * | ``Module::global_iterator`` - Typedef for global variable list iterator
3559 | ``Module::insertGlobalVariable()`` - Inserts a global variable to the list.
3560 | ``Module::removeGlobalVariable()`` - Removes a global variable from the list.
3561 | ``Module::eraseGlobalVariable()`` - Removes a global variable from the list and deletes it.
3565 ``Module`` object's GlobalVariable_ list.
3580 * ``FunctionCallee getOrInsertFunction(const std::string &Name,
3592 * ``std::string getTypeName(const Type *Ty)``
3595 return it. Otherwise return the empty string.
3597 * ``bool addTypeName(const std::string &Name, const Type *Ty)``
3624 class keeps a list of all of the ``User``\ s that is using it (the User_ class
3626 This use list is how LLVM represents def-use information in the program, and is
3631 values can be named. The "name" of the ``Value`` is a symbolic string printed
3641 be missing (an empty string), so names should **ONLY** be used for debugging
3658 * | ``Value::use_iterator`` - Typedef for iterator over the use-list
3660 use-list
3664 use-list.
3665 | ``use_iterator use_end()`` - Get an iterator to the end of the use-list.
3666 | ``User *use_back()`` - Returns the last element in the list.
3676 | ``std::string getName() const``
3677 | ``void setName(const std::string &Name)``
3684 This method traverses the use list of a ``Value`` changing all User_\ s of the
3708 ``Value``\ s. It exposes a list of "Operands" that are all of the ``Value``\ s
3722 The ``User`` class exposes the operand list in two ways: through an index access
3731 * | ``User::op_iterator`` - Typedef for iterator over the operand list
3733 list.
3734 | ``op_iterator op_end()`` - Get an iterator to the end of the operand list.
3956 of a large amount of data. The ``Function`` class keeps track of a list of
3957 BasicBlock_\ s, a list of formal Argument_\ s, and a SymbolTable_.
3959 The list of BasicBlock_\ s is the most commonly used part of ``Function``
3960 objects. The list imposes an implicit ordering of the blocks in the function,
3965 ``Function``. If the BasicBlock_ list is empty, this indicates that the
3969 In addition to a list of BasicBlock_\ s, the ``Function`` class also keeps track
3970 of the list of formal Argument_\ s that the function receives. This container
3971 manages the lifetime of the Argument_ nodes, just like the BasicBlock_ list does
3989 const std::string &N = "", Module* Parent = 0)``
3998 module's list of functions.
4006 * | ``Function::iterator`` - Typedef for basic block list iterator
4012 ``Function`` object's BasicBlock_ list.
4014 * | ``Function::arg_iterator`` - Typedef for the argument list iterator
4019 ``Function`` object's Argument_ list.
4023 Returns the list of Argument_. This is necessary to use when you need to
4024 update the list or perform a complex action that doesn't have a forwarding
4073 Constant *Initializer = 0, const std::string &Name = "", Module* Parent = 0)``
4118 maintains a list of Instruction_\ s, which form the body of the block. Matching
4119 the language definition, the last element of this list of instructions is always
4122 In addition to tracking the list of instructions that make up the block, the
4135 * ``BasicBlock(const std::string &Name = "", Function *Parent = 0)``
4145 * | ``BasicBlock::iterator`` - Typedef for instruction list iterator
4149 STL-style functions for accessing the instruction list.
4153 expose the underlying instruction list of a basic block in a way that is easy
4173 function. A Function maintains a list of its formal arguments. An argument has