<?xml version="1.0" encoding="UTF-8"?>
<wiki>
  <body>&lt;h2&gt;Type class&lt;/h2&gt;
&lt;h3&gt;&lt;code&gt;Type.function(type, arg1, arg2, ...)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Returns a &lt;code&gt;FunctionType&lt;/code&gt; to use when retrieving a function. &lt;br /&gt;
Arguments arg1, &amp;#8230; are of &lt;span class=&quot;caps&quot;&gt;LLVM&lt;/span&gt;::Type.&lt;/p&gt;
&lt;p&gt;Corresponds to &lt;code&gt;FunctionType::get(type, vector, false)&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Module class&lt;/h2&gt;
&lt;h3&gt;&lt;code&gt;get_or_insert_function(name, function_type)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Returns &lt;code&gt;Function&lt;/code&gt; with the given name and signature, creating the function if it does not exist.&lt;/p&gt;
&lt;p&gt;See &lt;code&gt;getOrInsertFunction(const std::string &amp;amp;Name, const FunctionType *T)&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;Function class&lt;/h2&gt;
&lt;h3&gt;&lt;code&gt;arguments()&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Returns a list of &lt;code&gt;Value&lt;/code&gt; for each function argument.&lt;/p&gt;
&lt;p&gt;Corresponds to using &lt;code&gt;arg_begin()&lt;/code&gt; and &lt;code&gt;arg_size()&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;create_block()&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Returns a new &lt;code&gt;BasicBlock&lt;/code&gt; for this function.&lt;/p&gt;
&lt;p&gt;Corresponds to &lt;code&gt;BasicBlock::Create(&quot;&quot;, function)&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;BasicBlock class&lt;/h2&gt;
&lt;h3&gt;&lt;code&gt;builder()&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Returns a new &lt;code&gt;Builder&lt;/code&gt; for this block.&lt;/p&gt;
&lt;p&gt;Corresponds to using &lt;code&gt;Builder.SetInsertPoint(basic_block)&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;Builder class&lt;/h2&gt;
&lt;h3&gt;&lt;code&gt;call(function, arg1, arg2, ...)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends a function call to the block, with the given arguments. &lt;br /&gt;
Arguments given are arguments to the call and should be of class &lt;span class=&quot;caps&quot;&gt;LLVM&lt;/span&gt;::Value.&lt;/p&gt;
&lt;p&gt;Corresponds to using &lt;code&gt;Builder.CreateCall(function, args.begin(), args.end(), &quot;&quot;)&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;return(value)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends a function return to the block with the given &lt;span class=&quot;caps&quot;&gt;LLVM&lt;/span&gt;::Value.&lt;/p&gt;
&lt;p&gt;Corresponds to &lt;code&gt;Builder.CreateRet(value)&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;add(value, value)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends the add function to the block, adding the two values given.&lt;/p&gt;
&lt;p&gt;Corresponds to &lt;code&gt;Builder.CreateAdd(value, value)&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;sub(value, value)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends the sub function to the block, subtracting the second value from the first.&lt;/p&gt;
&lt;p&gt;Corresponds to &lt;code&gt;Builder.CreateSub(value, value)&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;mul(value, value)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends the mul function to the block, multiplying the two values.&lt;/p&gt;
&lt;p&gt;Corresponds to &lt;code&gt;Builder.CreateMul(value, value)&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;fcmp_oeq(value, value)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends a float compare, returning 1 if neither value is a &lt;span class=&quot;caps&quot;&gt;QNAN&lt;/span&gt; and values are equal.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;fcmp_ogt(value, value)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends a float compare, returning 1 if neither value is a &lt;span class=&quot;caps&quot;&gt;QNAN&lt;/span&gt; and first value is greater than the second value.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;fcmp_oge(value, value)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends a float compare, returning 1 if neither value is a &lt;span class=&quot;caps&quot;&gt;QNAN&lt;/span&gt; and first value is less than or equal to the second value.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;fcmp_olt(value, value)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends a float compare, returning 1 if neither value is a &lt;span class=&quot;caps&quot;&gt;QNAN&lt;/span&gt; and first value is less than the second value.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;fcmp_ole(value, value)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends a float compare, returning 1 if neither value is a &lt;span class=&quot;caps&quot;&gt;QNAN&lt;/span&gt; and first value is less than or equal to the second value.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;fcmp_one(value, value)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends a float compare, returning 1 if neither value is a &lt;span class=&quot;caps&quot;&gt;QNAN&lt;/span&gt; and first value is not equal to the second value.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;fcmp_ord(value, value)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends a float compare, returning 1 if neither value is a &lt;span class=&quot;caps&quot;&gt;QNAN&lt;/span&gt;.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;fcmp_ueq(value, value)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends a float compare, returning 1 if either value is a &lt;span class=&quot;caps&quot;&gt;QNAN&lt;/span&gt; or first value is equal to the second value.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;fcmp_ugt(value, value)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends a float compare, returning 1 if either value is a &lt;span class=&quot;caps&quot;&gt;QNAN&lt;/span&gt; or first value is greater than the second value.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;fcmp_uge(value, value)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends a float compare, returning 1 if either value is a &lt;span class=&quot;caps&quot;&gt;QNAN&lt;/span&gt; or first value is greater than or equal to the second value.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;fcmp_ult(value, value)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends a float compare, returning 1 if either value is a &lt;span class=&quot;caps&quot;&gt;QNAN&lt;/span&gt; or first value is less than the second value.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;fcmp_ule(value, value)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends a float compare, returning 1 if either value is a &lt;span class=&quot;caps&quot;&gt;QNAN&lt;/span&gt; or first value is less than or equal to the second value.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;fcmp_uno(value, value)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends a float compare, returning 1 if either value is a &lt;span class=&quot;caps&quot;&gt;QNAN&lt;/span&gt;.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;trunc(value, type)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends a &lt;code&gt;'trunc .. to'&lt;/code&gt; instruction, truncating an integer from the current bit size to the size given by type. The type of the value must have a wider bit size than the target, equal sizes are not allowed.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;zext(value, type)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends a &lt;code&gt;'zext .. to'&lt;/code&gt; instruction, extending an integer from the current bit size to the size given by type. The type of the value must have a smaller bit size than the target, equal sizes are not allowed.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;sext(value, type)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends a &lt;code&gt;'sext .. to'&lt;/code&gt; instruction, sign extending an integer from the current bit size to the size given by type. The type of the value must have a smaller bit size than the target, equal sizes are not allowed.&lt;/p&gt;
&lt;p&gt;See the &lt;code&gt;'sext .. to'&lt;/code&gt; instruction.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;fp_trunc(value, type)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends a &lt;code&gt;'fptrunc .. to'&lt;/code&gt; instruction, truncating a float value to the bit size given by type. The target bit size must always be smaller than the bit size of the original value.&lt;/p&gt;
&lt;p&gt;See the &lt;code&gt;'fptrunk .. to'&lt;/code&gt; instruction.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;fp_ext(value, type)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends a &lt;code&gt;'fpext .. to'&lt;/code&gt; instruction, extending a float value to the bit size given by type. The target bit size must always be larger than the bit size of the original value.&lt;/p&gt;
&lt;p&gt;See the &lt;code&gt;'fpext .. to'&lt;/code&gt; instruction.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;fp_to_ui(value, type)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends a &lt;code&gt;'fptoui .. to'&lt;/code&gt; instruction, converting a floating point value to its unsigned integer value.&lt;/p&gt;
&lt;p&gt;See the &lt;code&gt;'fptoui .. to'&lt;/code&gt; instruction.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;fp_to_si(value, type)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends a &lt;code&gt;'fptosi .. to'&lt;/code&gt; instruction, converting a floating point value to its signed integer value.&lt;/p&gt;
&lt;p&gt;See the &lt;code&gt;'fptosi .. to'&lt;/code&gt; instruction.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;ui_to_fp(value, type)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends a &lt;code&gt;'uitofp .. to'&lt;/code&gt; instruction, converting an unsigned integer value to a floating point type.&lt;/p&gt;
&lt;p&gt;See the &lt;code&gt;'uitofp .. to'&lt;/code&gt; instruction.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;si_to_fp(value, type)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends a &lt;code&gt;'sitofp .. to'&lt;/code&gt; instruction, converting a signed integer value to a floating point type.&lt;/p&gt;
&lt;p&gt;See the &lt;code&gt;'sitofp .. to'&lt;/code&gt; instruction.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;ptr_to_int(value, type)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends a &lt;code&gt;'ptrtoint .. to'&lt;/code&gt; instruction, converting a pointer to an integer. This will automatically truncate or extend the pointer value as needed.&lt;/p&gt;
&lt;p&gt;See the &lt;code&gt;'ptrtoint .. to'&lt;/code&gt; instruction.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;int_to_ptr(value, type)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends a &lt;code&gt;'inttoptr .. to'&lt;/code&gt; instruction, converting an integer to a pointer. This will automatically truncate or zero-extend the integer value as needed.&lt;/p&gt;
&lt;p&gt;See the &lt;code&gt;'inttoptr .. to'&lt;/code&gt; instruction.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;bit_cast(value, type)&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Appends a &lt;code&gt;'bitcast .. to'&lt;/code&gt; instruction, converting a value to another value &lt;i&gt;of the same bit size&lt;/i&gt;.&lt;/p&gt;
&lt;p&gt;See the &lt;code&gt;'bitcast .. to'&lt;/code&gt; instruction.&lt;/p&gt;</body>
  <created-at type="datetime">2008-10-07T13:34:13-07:00</created-at>
  <id type="integer">64602</id>
  <permalink>api-documentation</permalink>
  <repository-id type="integer">44498</repository-id>
  <title>API documentation</title>
  <updated-at type="datetime">2008-10-11T10:16:45-07:00</updated-at>
  <user-id type="integer">27989</user-id>
</wiki>
