(index<- )        ./librustc/lib/llvm.rs

    git branch:    * master           5200215 auto merge of #14035 : alexcrichton/rust/experimental, r=huonw
    modified:    Fri May  9 13:02:28 2014
    1  // Copyright 2012 The Rust Project Developers. See the COPYRIGHT
    2  // file at the top-level directory of this distribution and at
    3  // http://rust-lang.org/COPYRIGHT.
    4  //
    5  // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
    6  // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
    7  // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
    8  // option. This file may not be copied, modified, or distributed
    9  // except according to those terms.
   10  
   11  #![allow(non_uppercase_pattern_statics)]
   12  #![allow(non_camel_case_types)]
   13  #![allow(dead_code)]
   14  
   15  use std::c_str::ToCStr;
   16  use std::cell::RefCell;
   17  use collections::HashMap;
   18  use libc::{c_uint, c_ushort, c_void, free};
   19  use std::str::raw::from_c_str;
   20  
   21  use middle::trans::type_::Type;
   22  
   23  pub type Opcode = u32;
   24  pub type Bool = c_uint;
   25  
   26  pub static True: Bool = 1 as Bool;
   27  pub static False: Bool = 0 as Bool;
   28  
   29  // Consts for the LLVM CallConv type, pre-cast to uint.
   30  
   31  #[deriving(Eq)]
   32  pub enum CallConv {
   33      CCallConv = 0,
   34      FastCallConv = 8,
   35      ColdCallConv = 9,
   36      X86StdcallCallConv = 64,
   37      X86FastcallCallConv = 65,
   38      X86_64_Win64 = 79,
   39  }
   40  
   41  pub enum Visibility {
   42      LLVMDefaultVisibility = 0,
   43      HiddenVisibility = 1,
   44      ProtectedVisibility = 2,
   45  }
   46  
   47  // This enum omits the obsolete (and no-op) linkage types DLLImportLinkage,
   48  // DLLExportLinkage, GhostLinkage and LinkOnceODRAutoHideLinkage.
   49  // LinkerPrivateLinkage and LinkerPrivateWeakLinkage are not included either;
   50  // they've been removed in upstream LLVM commit r203866.
   51  pub enum Linkage {
   52      ExternalLinkage = 0,
   53      AvailableExternallyLinkage = 1,
   54      LinkOnceAnyLinkage = 2,
   55      LinkOnceODRLinkage = 3,
   56      WeakAnyLinkage = 5,
   57      WeakODRLinkage = 6,
   58      AppendingLinkage = 7,
   59      InternalLinkage = 8,
   60      PrivateLinkage = 9,
   61      ExternalWeakLinkage = 12,
   62      CommonLinkage = 14,
   63  }
   64  
   65  #[deriving(Clone)]
   66  pub enum Attribute {
   67      ZExtAttribute = 1 << 0,
   68      SExtAttribute = 1 << 1,
   69      NoReturnAttribute = 1 << 2,
   70      InRegAttribute = 1 << 3,
   71      StructRetAttribute = 1 << 4,
   72      NoUnwindAttribute = 1 << 5,
   73      NoAliasAttribute = 1 << 6,
   74      ByValAttribute = 1 << 7,
   75      NestAttribute = 1 << 8,
   76      ReadNoneAttribute = 1 << 9,
   77      ReadOnlyAttribute = 1 << 10,
   78      NoInlineAttribute = 1 << 11,
   79      AlwaysInlineAttribute = 1 << 12,
   80      OptimizeForSizeAttribute = 1 << 13,
   81      StackProtectAttribute = 1 << 14,
   82      StackProtectReqAttribute = 1 << 15,
   83      AlignmentAttribute = 31 << 16,
   84      NoCaptureAttribute = 1 << 21,
   85      NoRedZoneAttribute = 1 << 22,
   86      NoImplicitFloatAttribute = 1 << 23,
   87      NakedAttribute = 1 << 24,
   88      InlineHintAttribute = 1 << 25,
   89      StackAttribute = 7 << 26,
   90      ReturnsTwiceAttribute = 1 << 29,
   91      UWTableAttribute = 1 << 30,
   92      NonLazyBindAttribute = 1 << 31,
   93  }
   94  
   95  // enum for the LLVM IntPredicate type
   96  pub enum IntPredicate {
   97      IntEQ = 32,
   98      IntNE = 33,
   99      IntUGT = 34,
  100      IntUGE = 35,
  101      IntULT = 36,
  102      IntULE = 37,
  103      IntSGT = 38,
  104      IntSGE = 39,
  105      IntSLT = 40,
  106      IntSLE = 41,
  107  }
  108  
  109  // enum for the LLVM RealPredicate type
  110  pub enum RealPredicate {
  111      RealPredicateFalse = 0,
  112      RealOEQ = 1,
  113      RealOGT = 2,
  114      RealOGE = 3,
  115      RealOLT = 4,
  116      RealOLE = 5,
  117      RealONE = 6,
  118      RealORD = 7,
  119      RealUNO = 8,
  120      RealUEQ = 9,
  121      RealUGT = 10,
  122      RealUGE = 11,
  123      RealULT = 12,
  124      RealULE = 13,
  125      RealUNE = 14,
  126      RealPredicateTrue = 15,
  127  }
  128  
  129  // The LLVM TypeKind type - must stay in sync with the def of
  130  // LLVMTypeKind in llvm/include/llvm-c/Core.h
  131  #[deriving(Eq)]
  132  #[repr(C)]
  133  pub enum TypeKind {
  134      Void      = 0,
  135      Half      = 1,
  136      Float     = 2,
  137      Double    = 3,
  138      X86_FP80  = 4,
  139      FP128     = 5,
  140      PPC_FP128 = 6,
  141      Label     = 7,
  142      Integer   = 8,
  143      Function  = 9,
  144      Struct    = 10,
  145      Array     = 11,
  146      Pointer   = 12,
  147      Vector    = 13,
  148      Metadata  = 14,
  149      X86_MMX   = 15,
  150  }
  151  
  152  #[repr(C)]
  153  pub enum AtomicBinOp {
  154      Xchg = 0,
  155      Add  = 1,
  156      Sub  = 2,
  157      And  = 3,
  158      Nand = 4,
  159      Or   = 5,
  160      Xor  = 6,
  161      Max  = 7,
  162      Min  = 8,
  163      UMax = 9,
  164      UMin = 10,
  165  }
  166  
  167  #[repr(C)]
  168  pub enum AtomicOrdering {
  169      NotAtomic = 0,
  170      Unordered = 1,
  171      Monotonic = 2,
  172      // Consume = 3,  // Not specified yet.
  173      Acquire = 4,
  174      Release = 5,
  175      AcquireRelease = 6,
  176      SequentiallyConsistent = 7
  177  }
  178  
  179  // Consts for the LLVMCodeGenFileType type (in include/llvm/c/TargetMachine.h)
  180  #[repr(C)]
  181  pub enum FileType {
  182      AssemblyFile = 0,
  183      ObjectFile = 1
  184  }
  185  
  186  pub enum Metadata {
  187      MD_dbg = 0,
  188      MD_tbaa = 1,
  189      MD_prof = 2,
  190      MD_fpmath = 3,
  191      MD_range = 4,
  192      MD_tbaa_struct = 5
  193  }
  194  
  195  // Inline Asm Dialect
  196  pub enum AsmDialect {
  197      AD_ATT   = 0,
  198      AD_Intel = 1
  199  }
  200  
  201  #[deriving(Eq)]
  202  #[repr(C)]
  203  pub enum CodeGenOptLevel {
  204      CodeGenLevelNone = 0,
  205      CodeGenLevelLess = 1,
  206      CodeGenLevelDefault = 2,
  207      CodeGenLevelAggressive = 3,
  208  }
  209  
  210  #[repr(C)]
  211  pub enum RelocMode {
  212      RelocDefault = 0,
  213      RelocStatic = 1,
  214      RelocPIC = 2,
  215      RelocDynamicNoPic = 3,
  216  }
  217  
  218  #[repr(C)]
  219  pub enum CodeGenModel {
  220      CodeModelDefault = 0,
  221      CodeModelJITDefault = 1,
  222      CodeModelSmall = 2,
  223      CodeModelKernel = 3,
  224      CodeModelMedium = 4,
  225      CodeModelLarge = 5,
  226  }
  227  
  228  // Opaque pointer types
  229  pub enum Module_opaque {}
  230  pub type ModuleRef = *Module_opaque;
  231  pub enum Context_opaque {}
  232  pub type ContextRef = *Context_opaque;
  233  pub enum Type_opaque {}
  234  pub type TypeRef = *Type_opaque;
  235  pub enum Value_opaque {}
  236  pub type ValueRef = *Value_opaque;
  237  pub enum BasicBlock_opaque {}
  238  pub type BasicBlockRef = *BasicBlock_opaque;
  239  pub enum Builder_opaque {}
  240  pub type BuilderRef = *Builder_opaque;
  241  pub enum ExecutionEngine_opaque {}
  242  pub type ExecutionEngineRef = *ExecutionEngine_opaque;
  243  pub enum MemoryBuffer_opaque {}
  244  pub type MemoryBufferRef = *MemoryBuffer_opaque;
  245  pub enum PassManager_opaque {}
  246  pub type PassManagerRef = *PassManager_opaque;
  247  pub enum PassManagerBuilder_opaque {}
  248  pub type PassManagerBuilderRef = *PassManagerBuilder_opaque;
  249  pub enum Use_opaque {}
  250  pub type UseRef = *Use_opaque;
  251  pub enum TargetData_opaque {}
  252  pub type TargetDataRef = *TargetData_opaque;
  253  pub enum ObjectFile_opaque {}
  254  pub type ObjectFileRef = *ObjectFile_opaque;
  255  pub enum SectionIterator_opaque {}
  256  pub type SectionIteratorRef = *SectionIterator_opaque;
  257  pub enum Pass_opaque {}
  258  pub type PassRef = *Pass_opaque;
  259  pub enum TargetMachine_opaque {}
  260  pub type TargetMachineRef = *TargetMachine_opaque;
  261  pub enum Archive_opaque {}
  262  pub type ArchiveRef = *Archive_opaque;
  263  
  264  pub mod debuginfo {
  265      use super::{ValueRef};
  266  
  267      pub enum DIBuilder_opaque {}
  268      pub type DIBuilderRef = *DIBuilder_opaque;
  269  
  270      pub type DIDescriptor = ValueRef;
  271      pub type DIScope = DIDescriptor;
  272      pub type DILocation = DIDescriptor;
  273      pub type DIFile = DIScope;
  274      pub type DILexicalBlock = DIScope;
  275      pub type DISubprogram = DIScope;
  276      pub type DIType = DIDescriptor;
  277      pub type DIBasicType = DIType;
  278      pub type DIDerivedType = DIType;
  279      pub type DICompositeType = DIDerivedType;
  280      pub type DIVariable = DIDescriptor;
  281      pub type DIGlobalVariable = DIDescriptor;
  282      pub type DIArray = DIDescriptor;
  283      pub type DISubrange = DIDescriptor;
  284  
  285      pub enum DIDescriptorFlags {
  286        FlagPrivate            = 1 << 0,
  287        FlagProtected          = 1 << 1,
  288        FlagFwdDecl            = 1 << 2,
  289        FlagAppleBlock         = 1 << 3,
  290        FlagBlockByrefStruct   = 1 << 4,
  291        FlagVirtual            = 1 << 5,
  292        FlagArtificial         = 1 << 6,
  293        FlagExplicit           = 1 << 7,
  294        FlagPrototyped         = 1 << 8,
  295        FlagObjcClassComplete  = 1 << 9,
  296        FlagObjectPointer      = 1 << 10,
  297        FlagVector             = 1 << 11,
  298        FlagStaticMember       = 1 << 12
  299      }
  300  }
  301  
  302  pub mod llvm {
  303      use super::{AtomicBinOp, AtomicOrdering, BasicBlockRef, ExecutionEngineRef};
  304      use super::{Bool, BuilderRef, ContextRef, MemoryBufferRef, ModuleRef};
  305      use super::{ObjectFileRef, Opcode, PassManagerRef, PassManagerBuilderRef};
  306      use super::{SectionIteratorRef, TargetDataRef, TypeKind, TypeRef, UseRef};
  307      use super::{ValueRef, TargetMachineRef, FileType, ArchiveRef};
  308      use super::{CodeGenModel, RelocMode, CodeGenOptLevel};
  309      use super::debuginfo::*;
  310      use libc::{c_char, c_int, c_longlong, c_ushort, c_uint, c_ulonglong,
  311                      size_t};
  312  
  313      // Link to our native llvm bindings (things that we need to use the C++ api
  314      // for) and because llvm is written in C++ we need to link against libstdc++
  315      //
  316      // You'll probably notice that there is an omission of all LLVM libraries
  317      // from this location. This is because the set of LLVM libraries that we
  318      // link to is mostly defined by LLVM, and the `llvm-config` tool is used to
  319      // figure out the exact set of libraries. To do this, the build system
  320      // generates an llvmdeps.rs file next to this one which will be
  321      // automatically updated whenever LLVM is updated to include an up-to-date
  322      // set of the libraries we need to link to LLVM for.
  323      #[link(name = "rustllvm", kind = "static")]
  324      extern {
  325          /* Create and destroy contexts. */
  326          pub fn LLVMContextCreate() -> ContextRef;
  327          pub fn LLVMContextDispose(CContextRef);
  328          pub fn LLVMGetMDKindIDInContext(CContextRef,
  329                                          Name: *c_char,
  330                                          SLenc_uint)
  331                                          -> c_uint;
  332  
  333          /* Create and destroy modules. */
  334          pub fn LLVMModuleCreateWithNameInContext(ModuleID: *c_char,
  335                                                   CContextRef)
  336                                                   -> ModuleRef;
  337          pub fn LLVMGetModuleContext(MModuleRef) -> ContextRef;
  338          pub fn LLVMDisposeModule(MModuleRef);
  339  
  340          /** Data layout. See Module::getDataLayout. */
  341          pub fn LLVMGetDataLayout(MModuleRef) -> *c_char;
  342          pub fn LLVMSetDataLayout(MModuleRef, Triple: *c_char);
  343  
  344          /** Target triple. See Module::getTargetTriple. */
  345          pub fn LLVMGetTarget(MModuleRef) -> *c_char;
  346          pub fn LLVMSetTarget(MModuleRef, Triple: *c_char);
  347  
  348          /** See Module::dump. */
  349          pub fn LLVMDumpModule(MModuleRef);
  350  
  351          /** See Module::setModuleInlineAsm. */
  352          pub fn LLVMSetModuleInlineAsm(MModuleRef, Asm: *c_char);
  353  
  354          /** See llvm::LLVMTypeKind::getTypeID. */
  355          pub fn LLVMGetTypeKind(TyTypeRef) -> TypeKind;
  356  
  357          /** See llvm::LLVMType::getContext. */
  358          pub fn LLVMGetTypeContext(TyTypeRef) -> ContextRef;
  359  
  360          /* Operations on integer types */
  361          pub fn LLVMInt1TypeInContext(CContextRef) -> TypeRef;
  362          pub fn LLVMInt8TypeInContext(CContextRef) -> TypeRef;
  363          pub fn LLVMInt16TypeInContext(CContextRef) -> TypeRef;
  364          pub fn LLVMInt32TypeInContext(CContextRef) -> TypeRef;
  365          pub fn LLVMInt64TypeInContext(CContextRef) -> TypeRef;
  366          pub fn LLVMIntTypeInContext(CContextRef, NumBitsc_uint)
  367                                      -> TypeRef;
  368  
  369          pub fn LLVMGetIntTypeWidth(IntegerTyTypeRef) -> c_uint;
  370  
  371          /* Operations on real types */
  372          pub fn LLVMFloatTypeInContext(CContextRef) -> TypeRef;
  373          pub fn LLVMDoubleTypeInContext(CContextRef) -> TypeRef;
  374          pub fn LLVMX86FP80TypeInContext(CContextRef) -> TypeRef;
  375          pub fn LLVMFP128TypeInContext(CContextRef) -> TypeRef;
  376          pub fn LLVMPPCFP128TypeInContext(CContextRef) -> TypeRef;
  377  
  378          /* Operations on function types */
  379          pub fn LLVMFunctionType(ReturnTypeTypeRef,
  380                                  ParamTypes: *TypeRef,
  381                                  ParamCountc_uint,
  382                                  IsVarArgBool)
  383                                  -> TypeRef;
  384          pub fn LLVMIsFunctionVarArg(FunctionTyTypeRef) -> Bool;
  385          pub fn LLVMGetReturnType(FunctionTyTypeRef) -> TypeRef;
  386          pub fn LLVMCountParamTypes(FunctionTyTypeRef) -> c_uint;
  387          pub fn LLVMGetParamTypes(FunctionTyTypeRef, Dest: *TypeRef);
  388  
  389          /* Operations on struct types */
  390          pub fn LLVMStructTypeInContext(CContextRef,
  391                                         ElementTypes: *TypeRef,
  392                                         ElementCountc_uint,
  393                                         PackedBool)
  394                                         -> TypeRef;
  395          pub fn LLVMCountStructElementTypes(StructTyTypeRef) -> c_uint;
  396          pub fn LLVMGetStructElementTypes(StructTyTypeRef,
  397                                           Dest: *mut TypeRef);
  398          pub fn LLVMIsPackedStruct(StructTyTypeRef) -> Bool;
  399  
  400          /* Operations on array, pointer, and vector types (sequence types) */
  401          pub fn LLVMArrayType(ElementTypeTypeRef, ElementCountc_uint)
  402                               -> TypeRef;
  403          pub fn LLVMPointerType(ElementTypeTypeRef, AddressSpacec_uint)
  404                                 -> TypeRef;
  405          pub fn LLVMVectorType(ElementTypeTypeRef, ElementCountc_uint)
  406                                -> TypeRef;
  407  
  408          pub fn LLVMGetElementType(TyTypeRef) -> TypeRef;
  409          pub fn LLVMGetArrayLength(ArrayTyTypeRef) -> c_uint;
  410          pub fn LLVMGetPointerAddressSpace(PointerTyTypeRef) -> c_uint;
  411          pub fn LLVMGetPointerToGlobal(EEExecutionEngineRef, VValueRef)
  412                                        -> *();
  413          pub fn LLVMGetVectorSize(VectorTyTypeRef) -> c_uint;
  414  
  415          /* Operations on other types */
  416          pub fn LLVMVoidTypeInContext(CContextRef) -> TypeRef;
  417          pub fn LLVMLabelTypeInContext(CContextRef) -> TypeRef;
  418          pub fn LLVMMetadataTypeInContext(CContextRef) -> TypeRef;
  419  
  420          /* Operations on all values */
  421          pub fn LLVMTypeOf(ValValueRef) -> TypeRef;
  422          pub fn LLVMGetValueName(ValValueRef) -> *c_char;
  423          pub fn LLVMSetValueName(ValValueRef, Name: *c_char);
  424          pub fn LLVMDumpValue(ValValueRef);
  425          pub fn LLVMReplaceAllUsesWith(OldValValueRef, NewValValueRef);
  426          pub fn LLVMHasMetadata(ValValueRef) -> c_int;
  427          pub fn LLVMGetMetadata(ValValueRef, KindIDc_uint) -> ValueRef;
  428          pub fn LLVMSetMetadata(ValValueRef, KindIDc_uint, NodeValueRef);
  429  
  430          /* Operations on Uses */
  431          pub fn LLVMGetFirstUse(ValValueRef) -> UseRef;
  432          pub fn LLVMGetNextUse(UUseRef) -> UseRef;
  433          pub fn LLVMGetUser(UUseRef) -> ValueRef;
  434          pub fn LLVMGetUsedValue(UUseRef) -> ValueRef;
  435  
  436          /* Operations on Users */
  437          pub fn LLVMGetNumOperands(ValValueRef) -> c_int;
  438          pub fn LLVMGetOperand(ValValueRef, Indexc_uint) -> ValueRef;
  439          pub fn LLVMSetOperand(ValValueRef, Indexc_uint, OpValueRef);
  440  
  441          /* Operations on constants of any type */
  442          pub fn LLVMConstNull(TyTypeRef) -> ValueRef;
  443          /* all zeroes */
  444          pub fn LLVMConstAllOnes(TyTypeRef) -> ValueRef;
  445          pub fn LLVMConstICmp(Predc_ushort, V1ValueRef, V2ValueRef)
  446                               -> ValueRef;
  447          pub fn LLVMConstFCmp(Predc_ushort, V1ValueRef, V2ValueRef)
  448                               -> ValueRef;
  449          /* only for int/vector */
  450          pub fn LLVMGetUndef(TyTypeRef) -> ValueRef;
  451          pub fn LLVMIsConstant(ValValueRef) -> Bool;
  452          pub fn LLVMIsNull(ValValueRef) -> Bool;
  453          pub fn LLVMIsUndef(ValValueRef) -> Bool;
  454          pub fn LLVMConstPointerNull(TyTypeRef) -> ValueRef;
  455  
  456          /* Operations on metadata */
  457          pub fn LLVMMDStringInContext(CContextRef,
  458                                       Str: *c_char,
  459                                       SLenc_uint)
  460                                       -> ValueRef;
  461          pub fn LLVMMDNodeInContext(CContextRef,
  462                                     Vals: *ValueRef,
  463                                     Countc_uint)
  464                                     -> ValueRef;
  465          pub fn LLVMAddNamedMetadataOperand(MModuleRef,
  466                                             Str: *c_char,
  467                                             ValValueRef);
  468  
  469          /* Operations on scalar constants */
  470          pub fn LLVMConstInt(IntTyTypeRef, Nc_ulonglong, SignExtendBool)
  471                              -> ValueRef;
  472          pub fn LLVMConstIntOfString(IntTyTypeRef, Text: *c_char, Radix: u8)
  473                                      -> ValueRef;
  474          pub fn LLVMConstIntOfStringAndSize(IntTyTypeRef,
  475                                             Text: *c_char,
  476                                             SLenc_uint,
  477                                             Radix: u8)
  478                                             -> ValueRef;
  479          pub fn LLVMConstReal(RealTyTypeRef, N: f64) -> ValueRef;
  480          pub fn LLVMConstRealOfString(RealTyTypeRef, Text: *c_char)
  481                                       -> ValueRef;
  482          pub fn LLVMConstRealOfStringAndSize(RealTyTypeRef,
  483                                              Text: *c_char,
  484                                              SLenc_uint)
  485                                              -> ValueRef;
  486          pub fn LLVMConstIntGetZExtValue(ConstantValValueRef) -> c_ulonglong;
  487          pub fn LLVMConstIntGetSExtValue(ConstantValValueRef) -> c_longlong;
  488  
  489  
  490          /* Operations on composite constants */
  491          pub fn LLVMConstStringInContext(CContextRef,
  492                                          Str: *c_char,
  493                                          Lengthc_uint,
  494                                          DontNullTerminateBool)
  495                                          -> ValueRef;
  496          pub fn LLVMConstStructInContext(CContextRef,
  497                                          ConstantVals: *ValueRef,
  498                                          Countc_uint,
  499                                          PackedBool)
  500                                          -> ValueRef;
  501  
  502          pub fn LLVMConstArray(ElementTyTypeRef,
  503                                ConstantVals: *ValueRef,
  504                                Lengthc_uint)
  505                                -> ValueRef;
  506          pub fn LLVMConstVector(ScalarConstantVals: *ValueRef, Sizec_uint)
  507                                 -> ValueRef;
  508  
  509          /* Constant expressions */
  510          pub fn LLVMAlignOf(TyTypeRef) -> ValueRef;
  511          pub fn LLVMSizeOf(TyTypeRef) -> ValueRef;
  512          pub fn LLVMConstNeg(ConstantValValueRef) -> ValueRef;
  513          pub fn LLVMConstNSWNeg(ConstantValValueRef) -> ValueRef;
  514          pub fn LLVMConstNUWNeg(ConstantValValueRef) -> ValueRef;
  515          pub fn LLVMConstFNeg(ConstantValValueRef) -> ValueRef;
  516          pub fn LLVMConstNot(ConstantValValueRef) -> ValueRef;
  517          pub fn LLVMConstAdd(LHSConstantValueRef, RHSConstantValueRef)
  518                              -> ValueRef;
  519          pub fn LLVMConstNSWAdd(LHSConstantValueRef, RHSConstantValueRef)
  520                                 -> ValueRef;
  521          pub fn LLVMConstNUWAdd(LHSConstantValueRef, RHSConstantValueRef)
  522                                 -> ValueRef;
  523          pub fn LLVMConstFAdd(LHSConstantValueRef, RHSConstantValueRef)
  524                               -> ValueRef;
  525          pub fn LLVMConstSub(LHSConstantValueRef, RHSConstantValueRef)
  526                              -> ValueRef;
  527          pub fn LLVMConstNSWSub(LHSConstantValueRef, RHSConstantValueRef)
  528                                 -> ValueRef;
  529          pub fn LLVMConstNUWSub(LHSConstantValueRef, RHSConstantValueRef)
  530                                 -> ValueRef;
  531          pub fn LLVMConstFSub(LHSConstantValueRef, RHSConstantValueRef)
  532                               -> ValueRef;
  533          pub fn LLVMConstMul(LHSConstantValueRef, RHSConstantValueRef)
  534                              -> ValueRef;
  535          pub fn LLVMConstNSWMul(LHSConstantValueRef, RHSConstantValueRef)
  536                                 -> ValueRef;
  537          pub fn LLVMConstNUWMul(LHSConstantValueRef, RHSConstantValueRef)
  538                                 -> ValueRef;
  539          pub fn LLVMConstFMul(LHSConstantValueRef, RHSConstantValueRef)
  540                               -> ValueRef;
  541          pub fn LLVMConstUDiv(LHSConstantValueRef, RHSConstantValueRef)
  542                               -> ValueRef;
  543          pub fn LLVMConstSDiv(LHSConstantValueRef, RHSConstantValueRef)
  544                               -> ValueRef;
  545          pub fn LLVMConstExactSDiv(LHSConstantValueRef,
  546                                    RHSConstantValueRef)
  547                                    -> ValueRef;
  548          pub fn LLVMConstFDiv(LHSConstantValueRef, RHSConstantValueRef)
  549                               -> ValueRef;
  550          pub fn LLVMConstURem(LHSConstantValueRef, RHSConstantValueRef)
  551                               -> ValueRef;
  552          pub fn LLVMConstSRem(LHSConstantValueRef, RHSConstantValueRef)
  553                               -> ValueRef;
  554          pub fn LLVMConstFRem(LHSConstantValueRef, RHSConstantValueRef)
  555                               -> ValueRef;
  556          pub fn LLVMConstAnd(LHSConstantValueRef, RHSConstantValueRef)
  557                              -> ValueRef;
  558          pub fn LLVMConstOr(LHSConstantValueRef, RHSConstantValueRef)
  559                             -> ValueRef;
  560          pub fn LLVMConstXor(LHSConstantValueRef, RHSConstantValueRef)
  561                              -> ValueRef;
  562          pub fn LLVMConstShl(LHSConstantValueRef, RHSConstantValueRef)
  563                              -> ValueRef;
  564          pub fn LLVMConstLShr(LHSConstantValueRef, RHSConstantValueRef)
  565                               -> ValueRef;
  566          pub fn LLVMConstAShr(LHSConstantValueRef, RHSConstantValueRef)
  567                               -> ValueRef;
  568          pub fn LLVMConstGEP(ConstantValValueRef,
  569                              ConstantIndices: *ValueRef,
  570                              NumIndicesc_uint)
  571                              -> ValueRef;
  572          pub fn LLVMConstInBoundsGEP(ConstantValValueRef,
  573                                      ConstantIndices: *ValueRef,
  574                                      NumIndicesc_uint)
  575                                      -> ValueRef;
  576          pub fn LLVMConstTrunc(ConstantValValueRef, ToTypeTypeRef)
  577                                -> ValueRef;
  578          pub fn LLVMConstSExt(ConstantValValueRef, ToTypeTypeRef)
  579                               -> ValueRef;
  580          pub fn LLVMConstZExt(ConstantValValueRef, ToTypeTypeRef)
  581                               -> ValueRef;
  582          pub fn LLVMConstFPTrunc(ConstantValValueRef, ToTypeTypeRef)
  583                                  -> ValueRef;
  584          pub fn LLVMConstFPExt(ConstantValValueRef, ToTypeTypeRef)
  585                                -> ValueRef;
  586          pub fn LLVMConstUIToFP(ConstantValValueRef, ToTypeTypeRef)
  587                                 -> ValueRef;
  588          pub fn LLVMConstSIToFP(ConstantValValueRef, ToTypeTypeRef)
  589                                 -> ValueRef;
  590          pub fn LLVMConstFPToUI(ConstantValValueRef, ToTypeTypeRef)
  591                                 -> ValueRef;
  592          pub fn LLVMConstFPToSI(ConstantValValueRef, ToTypeTypeRef)
  593                                 -> ValueRef;
  594          pub fn LLVMConstPtrToInt(ConstantValValueRef, ToTypeTypeRef)
  595                                   -> ValueRef;
  596          pub fn LLVMConstIntToPtr(ConstantValValueRef, ToTypeTypeRef)
  597                                   -> ValueRef;
  598          pub fn LLVMConstBitCast(ConstantValValueRef, ToTypeTypeRef)
  599                                  -> ValueRef;
  600          pub fn LLVMConstZExtOrBitCast(ConstantValValueRef, ToTypeTypeRef)
  601                                        -> ValueRef;
  602          pub fn LLVMConstSExtOrBitCast(ConstantValValueRef, ToTypeTypeRef)
  603                                        -> ValueRef;
  604          pub fn LLVMConstTruncOrBitCast(ConstantValValueRef, ToTypeTypeRef)
  605                                         -> ValueRef;
  606          pub fn LLVMConstPointerCast(ConstantValValueRef, ToTypeTypeRef)
  607                                      -> ValueRef;
  608          pub fn LLVMConstIntCast(ConstantValValueRef,
  609                                  ToTypeTypeRef,
  610                                  isSignedBool)
  611                                  -> ValueRef;
  612          pub fn LLVMConstFPCast(ConstantValValueRef, ToTypeTypeRef)
  613                                 -> ValueRef;
  614          pub fn LLVMConstSelect(ConstantConditionValueRef,
  615                                 ConstantIfTrueValueRef,
  616                                 ConstantIfFalseValueRef)
  617                                 -> ValueRef;
  618          pub fn LLVMConstExtractElement(VectorConstantValueRef,
  619                                         IndexConstantValueRef)
  620                                         -> ValueRef;
  621          pub fn LLVMConstInsertElement(VectorConstantValueRef,
  622                                        ElementValueConstantValueRef,
  623                                        IndexConstantValueRef)
  624                                        -> ValueRef;
  625          pub fn LLVMConstShuffleVector(VectorAConstantValueRef,
  626                                        VectorBConstantValueRef,
  627                                        MaskConstantValueRef)
  628                                        -> ValueRef;
  629          pub fn LLVMConstExtractValue(AggConstantValueRef,
  630                                       IdxList: *c_uint,
  631                                       NumIdxc_uint)
  632                                       -> ValueRef;
  633          pub fn LLVMConstInsertValue(AggConstantValueRef,
  634                                      ElementValueConstantValueRef,
  635                                      IdxList: *c_uint,
  636                                      NumIdxc_uint)
  637                                      -> ValueRef;
  638          pub fn LLVMConstInlineAsm(TyTypeRef,
  639                                    AsmString: *c_char,
  640                                    Constraints: *c_char,
  641                                    HasSideEffectsBool,
  642                                    IsAlignStackBool)
  643                                    -> ValueRef;
  644          pub fn LLVMBlockAddress(FValueRef, BBBasicBlockRef) -> ValueRef;
  645  
  646  
  647  
  648          /* Operations on global variables, functions, and aliases (globals) */
  649          pub fn LLVMGetGlobalParent(GlobalValueRef) -> ModuleRef;
  650          pub fn LLVMIsDeclaration(GlobalValueRef) -> Bool;
  651          pub fn LLVMGetLinkage(GlobalValueRef) -> c_uint;
  652          pub fn LLVMSetLinkage(GlobalValueRef, Linkc_uint);
  653          pub fn LLVMGetSection(GlobalValueRef) -> *c_char;
  654          pub fn LLVMSetSection(GlobalValueRef, Section: *c_char);
  655          pub fn LLVMGetVisibility(GlobalValueRef) -> c_uint;
  656          pub fn LLVMSetVisibility(GlobalValueRef, Vizc_uint);
  657          pub fn LLVMGetAlignment(GlobalValueRef) -> c_uint;
  658          pub fn LLVMSetAlignment(GlobalValueRef, Bytesc_uint);
  659  
  660  
  661          /* Operations on global variables */
  662          pub fn LLVMAddGlobal(MModuleRef, TyTypeRef, Name: *c_char)
  663                               -> ValueRef;
  664          pub fn LLVMAddGlobalInAddressSpace(MModuleRef,
  665                                             TyTypeRef,
  666                                             Name: *c_char,
  667                                             AddressSpacec_uint)
  668                                             -> ValueRef;
  669          pub fn LLVMGetNamedGlobal(MModuleRef, Name: *c_char) -> ValueRef;
  670          pub fn LLVMGetFirstGlobal(MModuleRef) -> ValueRef;
  671          pub fn LLVMGetLastGlobal(MModuleRef) -> ValueRef;
  672          pub fn LLVMGetNextGlobal(GlobalVarValueRef) -> ValueRef;
  673          pub fn LLVMGetPreviousGlobal(GlobalVarValueRef) -> ValueRef;
  674          pub fn LLVMDeleteGlobal(GlobalVarValueRef);
  675          pub fn LLVMGetInitializer(GlobalVarValueRef) -> ValueRef;
  676          pub fn LLVMSetInitializer(GlobalVarValueRef,
  677                                           ConstantValValueRef);
  678          pub fn LLVMIsThreadLocal(GlobalVarValueRef) -> Bool;
  679          pub fn LLVMSetThreadLocal(GlobalVarValueRef, IsThreadLocalBool);
  680          pub fn LLVMIsGlobalConstant(GlobalVarValueRef) -> Bool;
  681          pub fn LLVMSetGlobalConstant(GlobalVarValueRef, IsConstantBool);
  682  
  683          /* Operations on aliases */
  684          pub fn LLVMAddAlias(MModuleRef,
  685                              TyTypeRef,
  686                              AliaseeValueRef,
  687                              Name: *c_char)
  688                              -> ValueRef;
  689  
  690          /* Operations on functions */
  691          pub fn LLVMAddFunction(MModuleRef,
  692                                 Name: *c_char,
  693                                 FunctionTyTypeRef)
  694                                 -> ValueRef;
  695          pub fn LLVMGetNamedFunction(MModuleRef, Name: *c_char) -> ValueRef;
  696          pub fn LLVMGetFirstFunction(MModuleRef) -> ValueRef;
  697          pub fn LLVMGetLastFunction(MModuleRef) -> ValueRef;
  698          pub fn LLVMGetNextFunction(FnValueRef) -> ValueRef;
  699          pub fn LLVMGetPreviousFunction(FnValueRef) -> ValueRef;
  700          pub fn LLVMDeleteFunction(FnValueRef);
  701          pub fn LLVMGetOrInsertFunction(MModuleRef,
  702                                         Name: *c_char,
  703                                         FunctionTyTypeRef)
  704                                         -> ValueRef;
  705          pub fn LLVMGetIntrinsicID(FnValueRef) -> c_uint;
  706          pub fn LLVMGetFunctionCallConv(FnValueRef) -> c_uint;
  707          pub fn LLVMSetFunctionCallConv(FnValueRef, CCc_uint);
  708          pub fn LLVMGetGC(FnValueRef) -> *c_char;
  709          pub fn LLVMSetGC(FnValueRef, Name: *c_char);
  710          pub fn LLVMAddFunctionAttr(FnValueRef, PAc_uint);
  711          pub fn LLVMAddFunctionAttrString(FnValueRef, Name: *c_char);
  712          pub fn LLVMRemoveFunctionAttrString(FnValueRef, Name: *c_char);
  713          pub fn LLVMGetFunctionAttr(FnValueRef) -> c_ulonglong;
  714  
  715          pub fn LLVMAddReturnAttribute(FnValueRef, PAc_uint);
  716          pub fn LLVMRemoveReturnAttribute(FnValueRef, PAc_uint);
  717  
  718          pub fn LLVMAddColdAttribute(FnValueRef);
  719  
  720          pub fn LLVMRemoveFunctionAttr(FnValueRef,
  721                                        PAc_ulonglong,
  722                                        HighPAc_ulonglong);
  723  
  724          /* Operations on parameters */
  725          pub fn LLVMCountParams(FnValueRef) -> c_uint;
  726          pub fn LLVMGetParams(FnValueRef, Params: *ValueRef);
  727          pub fn LLVMGetParam(FnValueRef, Indexc_uint) -> ValueRef;
  728          pub fn LLVMGetParamParent(InstValueRef) -> ValueRef;
  729          pub fn LLVMGetFirstParam(FnValueRef) -> ValueRef;
  730          pub fn LLVMGetLastParam(FnValueRef) -> ValueRef;
  731          pub fn LLVMGetNextParam(ArgValueRef) -> ValueRef;
  732          pub fn LLVMGetPreviousParam(ArgValueRef) -> ValueRef;
  733          pub fn LLVMAddAttribute(ArgValueRef, PAc_uint);
  734          pub fn LLVMRemoveAttribute(ArgValueRef, PAc_uint);
  735          pub fn LLVMGetAttribute(ArgValueRef) -> c_uint;
  736          pub fn LLVMSetParamAlignment(ArgValueRef, alignc_uint);
  737  
  738          /* Operations on basic blocks */
  739          pub fn LLVMBasicBlockAsValue(BBBasicBlockRef) -> ValueRef;
  740          pub fn LLVMValueIsBasicBlock(ValValueRef) -> Bool;
  741          pub fn LLVMValueAsBasicBlock(ValValueRef) -> BasicBlockRef;
  742          pub fn LLVMGetBasicBlockParent(BBBasicBlockRef) -> ValueRef;
  743          pub fn LLVMCountBasicBlocks(FnValueRef) -> c_uint;
  744          pub fn LLVMGetBasicBlocks(FnValueRef, BasicBlocks: *ValueRef);
  745          pub fn LLVMGetFirstBasicBlock(FnValueRef) -> BasicBlockRef;
  746          pub fn LLVMGetLastBasicBlock(FnValueRef) -> BasicBlockRef;
  747          pub fn LLVMGetNextBasicBlock(BBBasicBlockRef) -> BasicBlockRef;
  748          pub fn LLVMGetPreviousBasicBlock(BBBasicBlockRef) -> BasicBlockRef;
  749          pub fn LLVMGetEntryBasicBlock(FnValueRef) -> BasicBlockRef;
  750  
  751          pub fn LLVMAppendBasicBlockInContext(CContextRef,
  752                                               FnValueRef,
  753                                               Name: *c_char)
  754                                               -> BasicBlockRef;
  755          pub fn LLVMInsertBasicBlockInContext(CContextRef,
  756                                               BBBasicBlockRef,
  757                                               Name: *c_char)
  758                                               -> BasicBlockRef;
  759          pub fn LLVMDeleteBasicBlock(BBBasicBlockRef);
  760  
  761          pub fn LLVMMoveBasicBlockAfter(BBBasicBlockRef,
  762                                         MoveAfterBasicBlockRef);
  763  
  764          pub fn LLVMMoveBasicBlockBefore(BBBasicBlockRef,
  765                                          MoveBeforeBasicBlockRef);
  766  
  767          /* Operations on instructions */
  768          pub fn LLVMGetInstructionParent(InstValueRef) -> BasicBlockRef;
  769          pub fn LLVMGetFirstInstruction(BBBasicBlockRef) -> ValueRef;
  770          pub fn LLVMGetLastInstruction(BBBasicBlockRef) -> ValueRef;
  771          pub fn LLVMGetNextInstruction(InstValueRef) -> ValueRef;
  772          pub fn LLVMGetPreviousInstruction(InstValueRef) -> ValueRef;
  773          pub fn LLVMInstructionEraseFromParent(InstValueRef);
  774  
  775          /* Operations on call sites */
  776          pub fn LLVMSetInstructionCallConv(InstrValueRef, CCc_uint);
  777          pub fn LLVMGetInstructionCallConv(InstrValueRef) -> c_uint;
  778          pub fn LLVMAddInstrAttribute(InstrValueRef,
  779                                       indexc_uint,
  780                                       IAc_uint);
  781          pub fn LLVMRemoveInstrAttribute(InstrValueRef,
  782                                          indexc_uint,
  783                                          IAc_uint);
  784          pub fn LLVMSetInstrParamAlignment(InstrValueRef,
  785                                            indexc_uint,
  786                                            alignc_uint);
  787  
  788          /* Operations on call instructions (only) */
  789          pub fn LLVMIsTailCall(CallInstValueRef) -> Bool;
  790          pub fn LLVMSetTailCall(CallInstValueRef, IsTailCallBool);
  791  
  792          /* Operations on load/store instructions (only) */
  793          pub fn LLVMGetVolatile(MemoryAccessInstValueRef) -> Bool;
  794          pub fn LLVMSetVolatile(MemoryAccessInstValueRef, volatileBool);
  795  
  796          /* Operations on phi nodes */
  797          pub fn LLVMAddIncoming(PhiNodeValueRef,
  798                                 IncomingValues: *ValueRef,
  799                                 IncomingBlocks: *BasicBlockRef,
  800                                 Countc_uint);
  801          pub fn LLVMCountIncoming(PhiNodeValueRef) -> c_uint;
  802          pub fn LLVMGetIncomingValue(PhiNodeValueRef, Indexc_uint)
  803                                      -> ValueRef;
  804          pub fn LLVMGetIncomingBlock(PhiNodeValueRef, Indexc_uint)
  805                                      -> BasicBlockRef;
  806  
  807          /* Instruction builders */
  808          pub fn LLVMCreateBuilderInContext(CContextRef) -> BuilderRef;
  809          pub fn LLVMPositionBuilder(BuilderBuilderRef,
  810                                     BlockBasicBlockRef,
  811                                     InstrValueRef);
  812          pub fn LLVMPositionBuilderBefore(BuilderBuilderRef,
  813                                           InstrValueRef);
  814          pub fn LLVMPositionBuilderAtEnd(BuilderBuilderRef,
  815                                          BlockBasicBlockRef);
  816          pub fn LLVMGetInsertBlock(BuilderBuilderRef) -> BasicBlockRef;
  817          pub fn LLVMClearInsertionPosition(BuilderBuilderRef);
  818          pub fn LLVMInsertIntoBuilder(BuilderBuilderRef, InstrValueRef);
  819          pub fn LLVMInsertIntoBuilderWithName(BuilderBuilderRef,
  820                                               InstrValueRef,
  821                                               Name: *c_char);
  822          pub fn LLVMDisposeBuilder(BuilderBuilderRef);
  823          pub fn LLVMDisposeExecutionEngine(EEExecutionEngineRef);
  824  
  825          /* Metadata */
  826          pub fn LLVMSetCurrentDebugLocation(BuilderBuilderRef, LValueRef);
  827          pub fn LLVMGetCurrentDebugLocation(BuilderBuilderRef) -> ValueRef;
  828          pub fn LLVMSetInstDebugLocation(BuilderBuilderRef, InstValueRef);
  829  
  830          /* Terminators */
  831          pub fn LLVMBuildRetVoid(BBuilderRef) -> ValueRef;
  832          pub fn LLVMBuildRet(BBuilderRef, VValueRef) -> ValueRef;
  833          pub fn LLVMBuildAggregateRet(BBuilderRef,
  834                                       RetVals: *ValueRef,
  835                                       Nc_uint)
  836                                       -> ValueRef;
  837          pub fn LLVMBuildBr(BBuilderRef, DestBasicBlockRef) -> ValueRef;
  838          pub fn LLVMBuildCondBr(BBuilderRef,
  839                                 IfValueRef,
  840                                 ThenBasicBlockRef,
  841                                 ElseBasicBlockRef)
  842                                 -> ValueRef;
  843          pub fn LLVMBuildSwitch(BBuilderRef,
  844                                 VValueRef,
  845                                 ElseBasicBlockRef,
  846                                 NumCasesc_uint)
  847                                 -> ValueRef;
  848          pub fn LLVMBuildIndirectBr(BBuilderRef,
  849                                     AddrValueRef,
  850                                     NumDestsc_uint)
  851                                     -> ValueRef;
  852          pub fn LLVMBuildInvoke(BBuilderRef,
  853                                 FnValueRef,
  854                                 Args: *ValueRef,
  855                                 NumArgsc_uint,
  856                                 ThenBasicBlockRef,
  857                                 CatchBasicBlockRef,
  858                                 Name: *c_char)
  859                                 -> ValueRef;
  860          pub fn LLVMBuildLandingPad(BBuilderRef,
  861                                     TyTypeRef,
  862                                     PersFnValueRef,
  863                                     NumClausesc_uint,
  864                                     Name: *c_char)
  865                                     -> ValueRef;
  866          pub fn LLVMBuildResume(BBuilderRef, ExnValueRef) -> ValueRef;
  867          pub fn LLVMBuildUnreachable(BBuilderRef) -> ValueRef;
  868  
  869          /* Add a case to the switch instruction */
  870          pub fn LLVMAddCase(SwitchValueRef,
  871                             OnValValueRef,
  872                             DestBasicBlockRef);
  873  
  874          /* Add a destination to the indirectbr instruction */
  875          pub fn LLVMAddDestination(IndirectBrValueRef, DestBasicBlockRef);
  876  
  877          /* Add a clause to the landing pad instruction */
  878          pub fn LLVMAddClause(LandingPadValueRef, ClauseValValueRef);
  879  
  880          /* Set the cleanup on a landing pad instruction */
  881          pub fn LLVMSetCleanup(LandingPadValueRef, ValBool);
  882  
  883          /* Arithmetic */
  884          pub fn LLVMBuildAdd(BBuilderRef,
  885                              LHSValueRef,
  886                              RHSValueRef,
  887                              Name: *c_char)
  888                              -> ValueRef;
  889          pub fn LLVMBuildNSWAdd(BBuilderRef,
  890                                 LHSValueRef,
  891                                 RHSValueRef,
  892                                 Name: *c_char)
  893                                 -> ValueRef;
  894          pub fn LLVMBuildNUWAdd(BBuilderRef,
  895                                 LHSValueRef,
  896                                 RHSValueRef,
  897                                 Name: *c_char)
  898                                 -> ValueRef;
  899          pub fn LLVMBuildFAdd(BBuilderRef,
  900                               LHSValueRef,
  901                               RHSValueRef,
  902                               Name: *c_char)
  903                               -> ValueRef;
  904          pub fn LLVMBuildSub(BBuilderRef,
  905                              LHSValueRef,
  906                              RHSValueRef,
  907                              Name: *c_char)
  908                              -> ValueRef;
  909          pub fn LLVMBuildNSWSub(BBuilderRef,
  910                                 LHSValueRef,
  911                                 RHSValueRef,
  912                                 Name: *c_char)
  913                                 -> ValueRef;
  914          pub fn LLVMBuildNUWSub(BBuilderRef,
  915                                 LHSValueRef,
  916                                 RHSValueRef,
  917                                 Name: *c_char)
  918                                 -> ValueRef;
  919          pub fn LLVMBuildFSub(BBuilderRef,
  920                               LHSValueRef,
  921                               RHSValueRef,
  922                               Name: *c_char)
  923                               -> ValueRef;
  924          pub fn LLVMBuildMul(BBuilderRef,
  925                              LHSValueRef,
  926                              RHSValueRef,
  927                              Name: *c_char)
  928                              -> ValueRef;
  929          pub fn LLVMBuildNSWMul(BBuilderRef,
  930                                 LHSValueRef,
  931                                 RHSValueRef,
  932                                 Name: *c_char)
  933                                 -> ValueRef;
  934          pub fn LLVMBuildNUWMul(BBuilderRef,
  935                                 LHSValueRef,
  936                                 RHSValueRef,
  937                                 Name: *c_char)
  938                                 -> ValueRef;
  939          pub fn LLVMBuildFMul(BBuilderRef,
  940                               LHSValueRef,
  941                               RHSValueRef,
  942                               Name: *c_char)
  943                               -> ValueRef;
  944          pub fn LLVMBuildUDiv(BBuilderRef,
  945                               LHSValueRef,
  946                               RHSValueRef,
  947                               Name: *c_char)
  948                               -> ValueRef;
  949          pub fn LLVMBuildSDiv(BBuilderRef,
  950                               LHSValueRef,
  951                               RHSValueRef,
  952                               Name: *c_char)
  953                               -> ValueRef;
  954          pub fn LLVMBuildExactSDiv(BBuilderRef,
  955                                    LHSValueRef,
  956                                    RHSValueRef,
  957                                    Name: *c_char)
  958                                    -> ValueRef;
  959          pub fn LLVMBuildFDiv(BBuilderRef,
  960                               LHSValueRef,
  961                               RHSValueRef,
  962                               Name: *c_char)
  963                               -> ValueRef;
  964          pub fn LLVMBuildURem(BBuilderRef,
  965                               LHSValueRef,
  966                               RHSValueRef,
  967                               Name: *c_char)
  968                               -> ValueRef;
  969          pub fn LLVMBuildSRem(BBuilderRef,
  970                               LHSValueRef,
  971                               RHSValueRef,
  972                               Name: *c_char)
  973                               -> ValueRef;
  974          pub fn LLVMBuildFRem(BBuilderRef,
  975                               LHSValueRef,
  976                               RHSValueRef,
  977                               Name: *c_char)
  978                               -> ValueRef;
  979          pub fn LLVMBuildShl(BBuilderRef,
  980                              LHSValueRef,
  981                              RHSValueRef,
  982                              Name: *c_char)
  983                              -> ValueRef;
  984          pub fn LLVMBuildLShr(BBuilderRef,
  985                               LHSValueRef,
  986                               RHSValueRef,
  987                               Name: *c_char)
  988                               -> ValueRef;
  989          pub fn LLVMBuildAShr(BBuilderRef,
  990                               LHSValueRef,
  991                               RHSValueRef,
  992                               Name: *c_char)
  993                               -> ValueRef;
  994          pub fn LLVMBuildAnd(BBuilderRef,
  995                              LHSValueRef,
  996                              RHSValueRef,
  997                              Name: *c_char)
  998                              -> ValueRef;
  999          pub fn LLVMBuildOr(BBuilderRef,
 1000                             LHSValueRef,
 1001                             RHSValueRef,
 1002                             Name: *c_char)
 1003                             -> ValueRef;
 1004          pub fn LLVMBuildXor(BBuilderRef,
 1005                              LHSValueRef,
 1006                              RHSValueRef,
 1007                              Name: *c_char)
 1008                              -> ValueRef;
 1009          pub fn LLVMBuildBinOp(BBuilderRef,
 1010                                OpOpcode,
 1011                                LHSValueRef,
 1012                                RHSValueRef,
 1013                                Name: *c_char)
 1014                                -> ValueRef;
 1015          pub fn LLVMBuildNeg(BBuilderRef, VValueRef, Name: *c_char)
 1016                              -> ValueRef;
 1017          pub fn LLVMBuildNSWNeg(BBuilderRef, VValueRef, Name: *c_char)
 1018                                 -> ValueRef;
 1019          pub fn LLVMBuildNUWNeg(BBuilderRef, VValueRef, Name: *c_char)
 1020                                 -> ValueRef;
 1021          pub fn LLVMBuildFNeg(BBuilderRef, VValueRef, Name: *c_char)
 1022                               -> ValueRef;
 1023          pub fn LLVMBuildNot(BBuilderRef, VValueRef, Name: *c_char)
 1024                              -> ValueRef;
 1025  
 1026          /* Memory */
 1027          pub fn LLVMBuildMalloc(BBuilderRef, TyTypeRef, Name: *c_char)
 1028                                 -> ValueRef;
 1029          pub fn LLVMBuildArrayMalloc(BBuilderRef,
 1030                                      TyTypeRef,
 1031                                      ValValueRef,
 1032                                      Name: *c_char)
 1033                                      -> ValueRef;
 1034          pub fn LLVMBuildAlloca(BBuilderRef, TyTypeRef, Name: *c_char)
 1035                                 -> ValueRef;
 1036          pub fn LLVMBuildArrayAlloca(BBuilderRef,
 1037                                      TyTypeRef,
 1038                                      ValValueRef,
 1039                                      Name: *c_char)
 1040                                      -> ValueRef;
 1041          pub fn LLVMBuildFree(BBuilderRef, PointerValValueRef) -> ValueRef;
 1042          pub fn LLVMBuildLoad(BBuilderRef,
 1043                               PointerValValueRef,
 1044                               Name: *c_char)
 1045                               -> ValueRef;
 1046  
 1047          pub fn LLVMBuildStore(BBuilderRef, ValValueRef, PtrValueRef)
 1048                                -> ValueRef;
 1049  
 1050          pub fn LLVMBuildGEP(BBuilderRef,
 1051                              PointerValueRef,
 1052                              Indices: *ValueRef,
 1053                              NumIndicesc_uint,
 1054                              Name: *c_char)
 1055                              -> ValueRef;
 1056          pub fn LLVMBuildInBoundsGEP(BBuilderRef,
 1057                                      PointerValueRef,
 1058                                      Indices: *ValueRef,
 1059                                      NumIndicesc_uint,
 1060                                      Name: *c_char)
 1061                                      -> ValueRef;
 1062          pub fn LLVMBuildStructGEP(BBuilderRef,
 1063                                    PointerValueRef,
 1064                                    Idxc_uint,
 1065                                    Name: *c_char)
 1066                                    -> ValueRef;
 1067          pub fn LLVMBuildGlobalString(BBuilderRef,
 1068                                       Str: *c_char,
 1069                                       Name: *c_char)
 1070                                       -> ValueRef;
 1071          pub fn LLVMBuildGlobalStringPtr(BBuilderRef,
 1072                                          Str: *c_char,
 1073                                          Name: *c_char)
 1074                                          -> ValueRef;
 1075  
 1076          /* Casts */
 1077          pub fn LLVMBuildTrunc(BBuilderRef,
 1078                                ValValueRef,
 1079                                DestTyTypeRef,
 1080                                Name: *c_char)
 1081                                -> ValueRef;
 1082          pub fn LLVMBuildZExt(BBuilderRef,
 1083                               ValValueRef,
 1084                               DestTyTypeRef,
 1085                               Name: *c_char)
 1086                               -> ValueRef;
 1087          pub fn LLVMBuildSExt(BBuilderRef,
 1088                               ValValueRef,
 1089                               DestTyTypeRef,
 1090                               Name: *c_char)
 1091                               -> ValueRef;
 1092          pub fn LLVMBuildFPToUI(BBuilderRef,
 1093                                 ValValueRef,
 1094                                 DestTyTypeRef,
 1095                                 Name: *c_char)
 1096                                 -> ValueRef;
 1097          pub fn LLVMBuildFPToSI(BBuilderRef,
 1098                                 ValValueRef,
 1099                                 DestTyTypeRef,
 1100                                 Name: *c_char)
 1101                                 -> ValueRef;
 1102          pub fn LLVMBuildUIToFP(BBuilderRef,
 1103                                 ValValueRef,
 1104                                 DestTyTypeRef,
 1105                                 Name: *c_char)
 1106                                 -> ValueRef;
 1107          pub fn LLVMBuildSIToFP(BBuilderRef,
 1108                                 ValValueRef,
 1109                                 DestTyTypeRef,
 1110                                 Name: *c_char)
 1111                                 -> ValueRef;
 1112          pub fn LLVMBuildFPTrunc(BBuilderRef,
 1113                                  ValValueRef,
 1114                                  DestTyTypeRef,
 1115                                  Name: *c_char)
 1116                                  -> ValueRef;
 1117          pub fn LLVMBuildFPExt(BBuilderRef,
 1118                                ValValueRef,
 1119                                DestTyTypeRef,
 1120                                Name: *c_char)
 1121                                -> ValueRef;
 1122          pub fn LLVMBuildPtrToInt(BBuilderRef,
 1123                                   ValValueRef,
 1124                                   DestTyTypeRef,
 1125                                   Name: *c_char)
 1126                                   -> ValueRef;
 1127          pub fn LLVMBuildIntToPtr(BBuilderRef,
 1128                                   ValValueRef,
 1129                                   DestTyTypeRef,
 1130                                   Name: *c_char)
 1131                                   -> ValueRef;
 1132          pub fn LLVMBuildBitCast(BBuilderRef,
 1133                                  ValValueRef,
 1134                                  DestTyTypeRef,
 1135                                  Name: *c_char)
 1136                                  -> ValueRef;
 1137          pub fn LLVMBuildZExtOrBitCast(BBuilderRef,
 1138                                        ValValueRef,
 1139                                        DestTyTypeRef,
 1140                                        Name: *c_char)
 1141                                        -> ValueRef;
 1142          pub fn LLVMBuildSExtOrBitCast(BBuilderRef,
 1143                                        ValValueRef,
 1144                                        DestTyTypeRef,
 1145                                        Name: *c_char)
 1146                                        -> ValueRef;
 1147          pub fn LLVMBuildTruncOrBitCast(BBuilderRef,
 1148                                         ValValueRef,
 1149                                         DestTyTypeRef,
 1150                                         Name: *c_char)
 1151                                         -> ValueRef;
 1152          pub fn LLVMBuildCast(BBuilderRef,
 1153                               OpOpcode,
 1154                               ValValueRef,
 1155                               DestTyTypeRef,
 1156                               Name: *c_char) -> ValueRef;
 1157          pub fn LLVMBuildPointerCast(BBuilderRef,
 1158                                      ValValueRef,
 1159                                      DestTyTypeRef,
 1160                                      Name: *c_char)
 1161                                      -> ValueRef;
 1162          pub fn LLVMBuildIntCast(BBuilderRef,
 1163                                  ValValueRef,
 1164                                  DestTyTypeRef,
 1165                                  Name: *c_char)
 1166                                  -> ValueRef;
 1167          pub fn LLVMBuildFPCast(BBuilderRef,
 1168                                 ValValueRef,
 1169                                 DestTyTypeRef,
 1170                                 Name: *c_char)
 1171                                 -> ValueRef;
 1172  
 1173          /* Comparisons */
 1174          pub fn LLVMBuildICmp(BBuilderRef,
 1175                               Opc_uint,
 1176                               LHSValueRef,
 1177                               RHSValueRef,
 1178                               Name: *c_char)
 1179                               -> ValueRef;
 1180          pub fn LLVMBuildFCmp(BBuilderRef,
 1181                               Opc_uint,
 1182                               LHSValueRef,
 1183                               RHSValueRef,
 1184                               Name: *c_char)
 1185                               -> ValueRef;
 1186  
 1187          /* Miscellaneous instructions */
 1188          pub fn LLVMBuildPhi(BBuilderRef, TyTypeRef, Name: *c_char)
 1189                              -> ValueRef;
 1190          pub fn LLVMBuildCall(BBuilderRef,
 1191                               FnValueRef,
 1192                               Args: *ValueRef,
 1193                               NumArgsc_uint,
 1194                               Name: *c_char)
 1195                               -> ValueRef;
 1196          pub fn LLVMBuildSelect(BBuilderRef,
 1197                                 IfValueRef,
 1198                                 ThenValueRef,
 1199                                 ElseValueRef,
 1200                                 Name: *c_char)
 1201                                 -> ValueRef;
 1202          pub fn LLVMBuildVAArg(BBuilderRef,
 1203                                listValueRef,
 1204                                TyTypeRef,
 1205                                Name: *c_char)
 1206                                -> ValueRef;
 1207          pub fn LLVMBuildExtractElement(BBuilderRef,
 1208                                         VecValValueRef,
 1209                                         IndexValueRef,
 1210                                         Name: *c_char)
 1211                                         -> ValueRef;
 1212          pub fn LLVMBuildInsertElement(BBuilderRef,
 1213                                        VecValValueRef,
 1214                                        EltValValueRef,
 1215                                        IndexValueRef,
 1216                                        Name: *c_char)
 1217                                        -> ValueRef;
 1218          pub fn LLVMBuildShuffleVector(BBuilderRef,
 1219                                        V1ValueRef,
 1220                                        V2ValueRef,
 1221                                        MaskValueRef,
 1222                                        Name: *c_char)
 1223                                        -> ValueRef;
 1224          pub fn LLVMBuildExtractValue(BBuilderRef,
 1225                                       AggValValueRef,
 1226                                       Indexc_uint,
 1227                                       Name: *c_char)
 1228                                       -> ValueRef;
 1229          pub fn LLVMBuildInsertValue(BBuilderRef,
 1230                                      AggValValueRef,
 1231                                      EltValValueRef,
 1232                                      Indexc_uint,
 1233                                      Name: *c_char)
 1234                                      -> ValueRef;
 1235  
 1236          pub fn LLVMBuildIsNull(BBuilderRef, ValValueRef, Name: *c_char)
 1237                                 -> ValueRef;
 1238          pub fn LLVMBuildIsNotNull(BBuilderRef, ValValueRef, Name: *c_char)
 1239                                    -> ValueRef;
 1240          pub fn LLVMBuildPtrDiff(BBuilderRef,
 1241                                  LHSValueRef,
 1242                                  RHSValueRef,
 1243                                  Name: *c_char)
 1244                                  -> ValueRef;
 1245  
 1246          /* Atomic Operations */
 1247          pub fn LLVMBuildAtomicLoad(BBuilderRef,
 1248                                     PointerValValueRef,
 1249                                     Name: *c_char,
 1250                                     OrderAtomicOrdering,
 1251                                     Alignmentc_uint)
 1252                                     -> ValueRef;
 1253  
 1254          pub fn LLVMBuildAtomicStore(BBuilderRef,
 1255                                      ValValueRef,
 1256                                      PtrValueRef,
 1257                                      OrderAtomicOrdering,
 1258                                      Alignmentc_uint)
 1259                                      -> ValueRef;
 1260  
 1261          pub fn LLVMBuildAtomicCmpXchg(BBuilderRef,
 1262                                        LHSValueRef,
 1263                                        CMPValueRef,
 1264                                        RHSValueRef,
 1265                                        OrderAtomicOrdering,
 1266                                        FailureOrderAtomicOrdering)
 1267                                        -> ValueRef;
 1268          pub fn LLVMBuildAtomicRMW(BBuilderRef,
 1269                                    OpAtomicBinOp,
 1270                                    LHSValueRef,
 1271                                    RHSValueRef,
 1272                                    OrderAtomicOrdering,
 1273                                    SingleThreadedBool)
 1274                                    -> ValueRef;
 1275  
 1276          pub fn LLVMBuildAtomicFence(BBuilderRef, OrderAtomicOrdering);
 1277  
 1278  
 1279          /* Selected entries from the downcasts. */
 1280          pub fn LLVMIsATerminatorInst(InstValueRef) -> ValueRef;
 1281          pub fn LLVMIsAStoreInst(InstValueRef) -> ValueRef;
 1282  
 1283          /** Writes a module to the specified path. Returns 0 on success. */
 1284          pub fn LLVMWriteBitcodeToFile(MModuleRef, Path: *c_char) -> c_int;
 1285  
 1286          /** Creates target data from a target layout string. */
 1287          pub fn LLVMCreateTargetData(StringRep: *c_char) -> TargetDataRef;
 1288          /// Adds the target data to the given pass manager. The pass manager
 1289          /// references the target data only weakly.
 1290          pub fn LLVMAddTargetData(TDTargetDataRef, PMPassManagerRef);
 1291          /** Number of bytes clobbered when doing a Store to *T. */
 1292          pub fn LLVMStoreSizeOfType(TDTargetDataRef, TyTypeRef)
 1293                                     -> c_ulonglong;
 1294  
 1295          /** Number of bytes clobbered when doing a Store to *T. */
 1296          pub fn LLVMSizeOfTypeInBits(TDTargetDataRef, TyTypeRef)
 1297                                      -> c_ulonglong;
 1298  
 1299          /** Distance between successive elements in an array of T.
 1300          Includes ABI padding. */
 1301          pub fn LLVMABISizeOfType(TDTargetDataRef, TyTypeRef) -> c_uint;
 1302  
 1303          /** Returns the preferred alignment of a type. */
 1304          pub fn LLVMPreferredAlignmentOfType(TDTargetDataRef, TyTypeRef)
 1305                                              -> c_uint;
 1306          /** Returns the minimum alignment of a type. */
 1307          pub fn LLVMABIAlignmentOfType(TDTargetDataRef, TyTypeRef)
 1308                                        -> c_uint;
 1309  
 1310          /// Computes the byte offset of the indexed struct element for a
 1311          /// target.
 1312          pub fn LLVMOffsetOfElement(TDTargetDataRef,
 1313                                     StructTyTypeRef,
 1314                                     Elementc_uint)
 1315                                     -> c_ulonglong;
 1316  
 1317          /**
 1318           * Returns the minimum alignment of a type when part of a call frame.
 1319           */
 1320          pub fn LLVMCallFrameAlignmentOfType(TDTargetDataRef, TyTypeRef)
 1321                                              -> c_uint;
 1322  
 1323          /** Disposes target data. */
 1324          pub fn LLVMDisposeTargetData(TDTargetDataRef);
 1325  
 1326          /** Creates a pass manager. */
 1327          pub fn LLVMCreatePassManager() -> PassManagerRef;
 1328  
 1329          /** Creates a function-by-function pass manager */
 1330          pub fn LLVMCreateFunctionPassManagerForModule(MModuleRef)
 1331                                                        -> PassManagerRef;
 1332  
 1333          /** Disposes a pass manager. */
 1334          pub fn LLVMDisposePassManager(PMPassManagerRef);
 1335  
 1336          /** Runs a pass manager on a module. */
 1337          pub fn LLVMRunPassManager(PMPassManagerRef, MModuleRef) -> Bool;
 1338  
 1339          /** Runs the function passes on the provided function. */
 1340          pub fn LLVMRunFunctionPassManager(FPMPassManagerRef, FValueRef)
 1341                                            -> Bool;
 1342  
 1343          /** Initializes all the function passes scheduled in the manager */
 1344          pub fn LLVMInitializeFunctionPassManager(FPMPassManagerRef) -> Bool;
 1345  
 1346          /** Finalizes all the function passes scheduled in the manager */
 1347          pub fn LLVMFinalizeFunctionPassManager(FPMPassManagerRef) -> Bool;
 1348  
 1349          pub fn LLVMInitializePasses();
 1350  
 1351          /** Adds a verification pass. */
 1352          pub fn LLVMAddVerifierPass(PMPassManagerRef);
 1353  
 1354          pub fn LLVMAddGlobalOptimizerPass(PMPassManagerRef);
 1355          pub fn LLVMAddIPSCCPPass(PMPassManagerRef);
 1356          pub fn LLVMAddDeadArgEliminationPass(PMPassManagerRef);
 1357          pub fn LLVMAddInstructionCombiningPass(PMPassManagerRef);
 1358          pub fn LLVMAddCFGSimplificationPass(PMPassManagerRef);
 1359          pub fn LLVMAddFunctionInliningPass(PMPassManagerRef);
 1360          pub fn LLVMAddFunctionAttrsPass(PMPassManagerRef);
 1361          pub fn LLVMAddScalarReplAggregatesPass(PMPassManagerRef);
 1362          pub fn LLVMAddScalarReplAggregatesPassSSA(PMPassManagerRef);
 1363          pub fn LLVMAddJumpThreadingPass(PMPassManagerRef);
 1364          pub fn LLVMAddConstantPropagationPass(PMPassManagerRef);
 1365          pub fn LLVMAddReassociatePass(PMPassManagerRef);
 1366          pub fn LLVMAddLoopRotatePass(PMPassManagerRef);
 1367          pub fn LLVMAddLICMPass(PMPassManagerRef);
 1368          pub fn LLVMAddLoopUnswitchPass(PMPassManagerRef);
 1369          pub fn LLVMAddLoopDeletionPass(PMPassManagerRef);
 1370          pub fn LLVMAddLoopUnrollPass(PMPassManagerRef);
 1371          pub fn LLVMAddGVNPass(PMPassManagerRef);
 1372          pub fn LLVMAddMemCpyOptPass(PMPassManagerRef);
 1373          pub fn LLVMAddSCCPPass(PMPassManagerRef);
 1374          pub fn LLVMAddDeadStoreEliminationPass(PMPassManagerRef);
 1375          pub fn LLVMAddStripDeadPrototypesPass(PMPassManagerRef);
 1376          pub fn LLVMAddConstantMergePass(PMPassManagerRef);
 1377          pub fn LLVMAddArgumentPromotionPass(PMPassManagerRef);
 1378          pub fn LLVMAddTailCallEliminationPass(PMPassManagerRef);
 1379          pub fn LLVMAddIndVarSimplifyPass(PMPassManagerRef);
 1380          pub fn LLVMAddAggressiveDCEPass(PMPassManagerRef);
 1381          pub fn LLVMAddGlobalDCEPass(PMPassManagerRef);
 1382          pub fn LLVMAddCorrelatedValuePropagationPass(PMPassManagerRef);
 1383          pub fn LLVMAddPruneEHPass(PMPassManagerRef);
 1384          pub fn LLVMAddSimplifyLibCallsPass(PMPassManagerRef);
 1385          pub fn LLVMAddLoopIdiomPass(PMPassManagerRef);
 1386          pub fn LLVMAddEarlyCSEPass(PMPassManagerRef);
 1387          pub fn LLVMAddTypeBasedAliasAnalysisPass(PMPassManagerRef);
 1388          pub fn LLVMAddBasicAliasAnalysisPass(PMPassManagerRef);
 1389  
 1390          pub fn LLVMPassManagerBuilderCreate() -> PassManagerBuilderRef;
 1391          pub fn LLVMPassManagerBuilderDispose(PMBPassManagerBuilderRef);
 1392          pub fn LLVMPassManagerBuilderSetOptLevel(PMBPassManagerBuilderRef,
 1393                                                   OptimizationLevelc_uint);
 1394          pub fn LLVMPassManagerBuilderSetSizeLevel(PMBPassManagerBuilderRef,
 1395                                                    ValueBool);
 1396          pub fn LLVMPassManagerBuilderSetDisableUnitAtATime(
 1397              PMBPassManagerBuilderRef,
 1398              ValueBool);
 1399          pub fn LLVMPassManagerBuilderSetDisableUnrollLoops(
 1400              PMBPassManagerBuilderRef,
 1401              ValueBool);
 1402          pub fn LLVMPassManagerBuilderSetDisableSimplifyLibCalls(
 1403              PMBPassManagerBuilderRef,
 1404              ValueBool);
 1405          pub fn LLVMPassManagerBuilderUseInlinerWithThreshold(
 1406              PMBPassManagerBuilderRef,
 1407              thresholdc_uint);
 1408          pub fn LLVMPassManagerBuilderPopulateModulePassManager(
 1409              PMBPassManagerBuilderRef,
 1410              PMPassManagerRef);
 1411  
 1412          pub fn LLVMPassManagerBuilderPopulateFunctionPassManager(
 1413              PMBPassManagerBuilderRef,
 1414              PMPassManagerRef);
 1415          pub fn LLVMPassManagerBuilderPopulateLTOPassManager(
 1416              PMBPassManagerBuilderRef,
 1417              PMPassManagerRef,
 1418              InternalizeBool,
 1419              RunInlinerBool);
 1420  
 1421          /** Destroys a memory buffer. */
 1422          pub fn LLVMDisposeMemoryBuffer(MemBufMemoryBufferRef);
 1423  
 1424  
 1425          /* Stuff that's in rustllvm/ because it's not upstream yet. */
 1426  
 1427          /** Opens an object file. */
 1428          pub fn LLVMCreateObjectFile(MemBufMemoryBufferRef) -> ObjectFileRef;
 1429          /** Closes an object file. */
 1430          pub fn LLVMDisposeObjectFile(ObjFileObjectFileRef);
 1431  
 1432          /** Enumerates the sections in an object file. */
 1433          pub fn LLVMGetSections(ObjFileObjectFileRef) -> SectionIteratorRef;
 1434          /** Destroys a section iterator. */
 1435          pub fn LLVMDisposeSectionIterator(SISectionIteratorRef);
 1436          /** Returns true if the section iterator is at the end of the section
 1437              list: */
 1438          pub fn LLVMIsSectionIteratorAtEnd(ObjFileObjectFileRef,
 1439                                            SISectionIteratorRef)
 1440                                            -> Bool;
 1441          /** Moves the section iterator to point to the next section. */
 1442          pub fn LLVMMoveToNextSection(SISectionIteratorRef);
 1443          /** Returns the current section size. */
 1444          pub fn LLVMGetSectionSize(SISectionIteratorRef) -> c_ulonglong;
 1445          /** Returns the current section contents as a string buffer. */
 1446          pub fn LLVMGetSectionContents(SISectionIteratorRef) -> *c_char;
 1447  
 1448          /** Reads the given file and returns it as a memory buffer. Use
 1449              LLVMDisposeMemoryBuffer() to get rid of it. */
 1450          pub fn LLVMRustCreateMemoryBufferWithContentsOfFile(Path: *c_char)
 1451              -> MemoryBufferRef;
 1452          /** Borrows the contents of the memory buffer (doesn't copy it) */
 1453          pub fn LLVMCreateMemoryBufferWithMemoryRange(InputData: *c_char,
 1454                                                       InputDataLengthsize_t,
 1455                                                       BufferName: *c_char,
 1456                                                       RequiresNullBool)
 1457              -> MemoryBufferRef;
 1458          pub fn LLVMCreateMemoryBufferWithMemoryRangeCopy(InputData: *c_char,
 1459                                                           InputDataLengthsize_t,
 1460                                                           BufferName: *c_char)
 1461              -> MemoryBufferRef;
 1462  
 1463          pub fn LLVMIsMultithreaded() -> Bool;
 1464          pub fn LLVMStartMultithreaded() -> Bool;
 1465  
 1466          /** Returns a string describing the last error caused by an LLVMRust*
 1467              call. */
 1468          pub fn LLVMRustGetLastError() -> *c_char;
 1469  
 1470          /// Print the pass timings since static dtors aren't picking them up.
 1471          pub fn LLVMRustPrintPassTimings();
 1472  
 1473          pub fn LLVMStructCreateNamed(CContextRef, Name: *c_char) -> TypeRef;
 1474  
 1475          pub fn LLVMStructSetBody(StructTyTypeRef,
 1476                                   ElementTypes: *TypeRef,
 1477                                   ElementCountc_uint,
 1478                                   PackedBool);
 1479  
 1480          pub fn LLVMConstNamedStruct(STypeRef,
 1481                                      ConstantVals: *ValueRef,
 1482                                      Countc_uint)
 1483                                      -> ValueRef;
 1484  
 1485          /** Enables LLVM debug output. */
 1486          pub fn LLVMSetDebug(Enabledc_int);
 1487  
 1488          /** Prepares inline assembly. */
 1489          pub fn LLVMInlineAsm(TyTypeRef,
 1490                               AsmString: *c_char,
 1491                               Constraints: *c_char,
 1492                               SideEffectsBool,
 1493                               AlignStackBool,
 1494                               Dialectc_uint)
 1495                               -> ValueRef;
 1496  
 1497          pub static LLVMRustDebugMetadataVersion: u32;
 1498  
 1499          pub fn LLVMRustAddModuleFlag(MModuleRef,
 1500                                       name: *c_char,
 1501                                       value: u32);
 1502  
 1503          pub fn LLVMDIBuilderCreate(MModuleRef) -> DIBuilderRef;
 1504  
 1505          pub fn LLVMDIBuilderDispose(BuilderDIBuilderRef);
 1506  
 1507          pub fn LLVMDIBuilderFinalize(BuilderDIBuilderRef);
 1508  
 1509          pub fn LLVMDIBuilderCreateCompileUnit(BuilderDIBuilderRef,
 1510                                                Langc_uint,
 1511                                                File: *c_char,
 1512                                                Dir: *c_char,
 1513                                                Producer: *c_char,
 1514                                                isOptimized: bool,
 1515                                                Flags: *c_char,
 1516                                                RuntimeVerc_uint,
 1517                                                SplitName: *c_char);
 1518  
 1519          pub fn LLVMDIBuilderCreateFile(BuilderDIBuilderRef,
 1520                                         Filename: *c_char,
 1521                                         Directory: *c_char)
 1522                                         -> DIFile;
 1523  
 1524          pub fn LLVMDIBuilderCreateSubroutineType(BuilderDIBuilderRef,
 1525                                                   FileDIFile,
 1526                                                   ParameterTypesDIArray)
 1527                                                   -> DICompositeType;
 1528  
 1529          pub fn LLVMDIBuilderCreateFunction(BuilderDIBuilderRef,
 1530                                             ScopeDIDescriptor,
 1531                                             Name: *c_char,
 1532                                             LinkageName: *c_char,
 1533                                             FileDIFile,
 1534                                             LineNoc_uint,
 1535                                             TyDIType,
 1536                                             isLocalToUnit: bool,
 1537                                             isDefinition: bool,
 1538                                             ScopeLinec_uint,
 1539                                             Flagsc_uint,
 1540                                             isOptimized: bool,
 1541                                             FnValueRef,
 1542                                             TParamValueRef,
 1543                                             DeclValueRef)
 1544                                             -> DISubprogram;
 1545  
 1546          pub fn LLVMDIBuilderCreateBasicType(BuilderDIBuilderRef,
 1547                                              Name: *c_char,
 1548                                              SizeInBitsc_ulonglong,
 1549                                              AlignInBitsc_ulonglong,
 1550                                              Encodingc_uint)
 1551                                              -> DIBasicType;
 1552  
 1553          pub fn LLVMDIBuilderCreatePointerType(BuilderDIBuilderRef,
 1554                                                PointeeTyDIType,
 1555                                                SizeInBitsc_ulonglong,
 1556                                                AlignInBitsc_ulonglong,
 1557                                                Name: *c_char)
 1558                                                -> DIDerivedType;
 1559  
 1560          pub fn LLVMDIBuilderCreateStructType(BuilderDIBuilderRef,
 1561                                               ScopeDIDescriptor,
 1562                                               Name: *c_char,
 1563                                               FileDIFile,
 1564                                               LineNumberc_uint,
 1565                                               SizeInBitsc_ulonglong,
 1566                                               AlignInBitsc_ulonglong,
 1567                                               Flagsc_uint,
 1568                                               DerivedFromDIType,
 1569                                               ElementsDIArray,
 1570                                               RunTimeLangc_uint,
 1571                                               VTableHolderValueRef,
 1572                                               UniqueId: *c_char)
 1573                                               -> DICompositeType;
 1574  
 1575          pub fn LLVMDIBuilderCreateMemberType(BuilderDIBuilderRef,
 1576                                               ScopeDIDescriptor,
 1577                                               Name: *c_char,
 1578                                               FileDIFile,
 1579                                               LineNoc_uint,
 1580                                               SizeInBitsc_ulonglong,
 1581                                               AlignInBitsc_ulonglong,
 1582                                               OffsetInBitsc_ulonglong,
 1583                                               Flagsc_uint,
 1584                                               TyDIType)
 1585                                               -> DIDerivedType;
 1586  
 1587          pub fn LLVMDIBuilderCreateLexicalBlock(BuilderDIBuilderRef,
 1588                                                 ScopeDIDescriptor,
 1589                                                 FileDIFile,
 1590                                                 Linec_uint,
 1591                                                 Colc_uint,
 1592                                                 Discriminatorc_uint)
 1593                                                 -> DILexicalBlock;
 1594  
 1595          pub fn LLVMDIBuilderCreateStaticVariable(BuilderDIBuilderRef,
 1596                                                   ContextDIDescriptor,
 1597                                                   Name: *c_char,
 1598                                                   LinkageName: *c_char,
 1599                                                   FileDIFile,
 1600                                                   LineNoc_uint,
 1601                                                   TyDIType,
 1602                                                   isLocalToUnit: bool,
 1603                                                   ValValueRef,
 1604                                                   DeclValueRef)
 1605                                                   -> DIGlobalVariable;
 1606  
 1607          pub fn LLVMDIBuilderCreateLocalVariable(BuilderDIBuilderRef,
 1608                                                  Tagc_uint,
 1609                                                  ScopeDIDescriptor,
 1610                                                  Name: *c_char,
 1611                                                  FileDIFile,
 1612                                                  LineNoc_uint,
 1613                                                  TyDIType,
 1614                                                  AlwaysPreserve: bool,
 1615                                                  Flagsc_uint,
 1616                                                  ArgNoc_uint)
 1617                                                  -> DIVariable;
 1618  
 1619          pub fn LLVMDIBuilderCreateArrayType(BuilderDIBuilderRef,
 1620                                              Sizec_ulonglong,
 1621                                              AlignInBitsc_ulonglong,
 1622                                              TyDIType,
 1623                                              SubscriptsDIArray)
 1624                                              -> DIType;
 1625  
 1626          pub fn LLVMDIBuilderCreateVectorType(BuilderDIBuilderRef,
 1627                                               Sizec_ulonglong,
 1628                                               AlignInBitsc_ulonglong,
 1629                                               TyDIType,
 1630                                               SubscriptsDIArray)
 1631                                               -> DIType;
 1632  
 1633          pub fn LLVMDIBuilderGetOrCreateSubrange(BuilderDIBuilderRef,
 1634                                                  Loc_longlong,
 1635                                                  Countc_longlong)
 1636                                                  -> DISubrange;
 1637  
 1638          pub fn LLVMDIBuilderGetOrCreateArray(BuilderDIBuilderRef,
 1639                                               Ptr: *DIDescriptor,
 1640                                               Countc_uint)
 1641                                               -> DIArray;
 1642  
 1643          pub fn LLVMDIBuilderInsertDeclareAtEnd(BuilderDIBuilderRef,
 1644                                                 ValValueRef,
 1645                                                 VarInfoDIVariable,
 1646                                                 InsertAtEndBasicBlockRef)
 1647                                                 -> ValueRef;
 1648  
 1649          pub fn LLVMDIBuilderInsertDeclareBefore(BuilderDIBuilderRef,
 1650                                                  ValValueRef,
 1651                                                  VarInfoDIVariable,
 1652                                                  InsertBeforeValueRef)
 1653                                                  -> ValueRef;
 1654  
 1655          pub fn LLVMDIBuilderCreateEnumerator(BuilderDIBuilderRef,
 1656                                               Name: *c_char,
 1657                                               Valc_ulonglong)
 1658                                               -> ValueRef;
 1659  
 1660          pub fn LLVMDIBuilderCreateEnumerationType(BuilderDIBuilderRef,
 1661                                                    ScopeValueRef,
 1662                                                    Name: *c_char,
 1663                                                    FileValueRef,
 1664                                                    LineNumberc_uint,
 1665                                                    SizeInBitsc_ulonglong,
 1666                                                    AlignInBitsc_ulonglong,
 1667                                                    ElementsValueRef,
 1668                                                    ClassTypeValueRef)
 1669                                                    -> ValueRef;
 1670  
 1671          pub fn LLVMDIBuilderCreateUnionType(BuilderDIBuilderRef,
 1672                                              ScopeValueRef,
 1673                                              Name: *c_char,
 1674                                              FileValueRef,
 1675                                              LineNumberc_uint,
 1676                                              SizeInBitsc_ulonglong,
 1677                                              AlignInBitsc_ulonglong,
 1678                                              Flagsc_uint,
 1679                                              ElementsValueRef,
 1680                                              RunTimeLangc_uint,
 1681                                              UniqueId: *c_char)
 1682                                              -> ValueRef;
 1683  
 1684          pub fn LLVMSetUnnamedAddr(GlobalVarValueRef, UnnamedAddrBool);
 1685  
 1686          pub fn LLVMDIBuilderCreateTemplateTypeParameter(BuilderDIBuilderRef,
 1687                                                          ScopeValueRef,
 1688                                                          Name: *c_char,
 1689                                                          TyValueRef,
 1690                                                          FileValueRef,
 1691                                                          LineNoc_uint,
 1692                                                          ColumnNoc_uint)
 1693                                                          -> ValueRef;
 1694  
 1695          pub fn LLVMDIBuilderCreateOpDeref(IntTypeTypeRef) -> ValueRef;
 1696  
 1697          pub fn LLVMDIBuilderCreateOpPlus(IntTypeTypeRef) -> ValueRef;
 1698  
 1699          pub fn LLVMDIBuilderCreateComplexVariable(BuilderDIBuilderRef,
 1700              Tagc_uint,
 1701              ScopeValueRef,
 1702              Name: *c_char,
 1703              FileValueRef,
 1704              LineNoc_uint,
 1705              TyValueRef,
 1706              AddrOps: *ValueRef,
 1707              AddrOpsCountc_uint,
 1708              ArgNoc_uint)
 1709              -> ValueRef;
 1710  
 1711          pub fn LLVMDIBuilderCreateNameSpace(BuilderDIBuilderRef,
 1712                                              ScopeValueRef,
 1713                                              Name: *c_char,
 1714                                              FileValueRef,
 1715                                              LineNoc_uint)
 1716                                              -> ValueRef;
 1717  
 1718          pub fn LLVMDICompositeTypeSetTypeArray(CompositeTypeValueRef, TypeArrayValueRef);
 1719          pub fn LLVMTypeToString(TypeTypeRef) -> *c_char;
 1720          pub fn LLVMValueToString(value_refValueRef) -> *c_char;
 1721  
 1722          pub fn LLVMIsAArgument(value_refValueRef) -> ValueRef;
 1723  
 1724          pub fn LLVMIsAAllocaInst(value_refValueRef) -> ValueRef;
 1725  
 1726          pub fn LLVMInitializeX86TargetInfo();
 1727          pub fn LLVMInitializeX86Target();
 1728          pub fn LLVMInitializeX86TargetMC();
 1729          pub fn LLVMInitializeX86AsmPrinter();
 1730          pub fn LLVMInitializeX86AsmParser();
 1731          pub fn LLVMInitializeARMTargetInfo();
 1732          pub fn LLVMInitializeARMTarget();
 1733          pub fn LLVMInitializeARMTargetMC();
 1734          pub fn LLVMInitializeARMAsmPrinter();
 1735          pub fn LLVMInitializeARMAsmParser();
 1736          pub fn LLVMInitializeMipsTargetInfo();
 1737          pub fn LLVMInitializeMipsTarget();
 1738          pub fn LLVMInitializeMipsTargetMC();
 1739          pub fn LLVMInitializeMipsAsmPrinter();
 1740          pub fn LLVMInitializeMipsAsmParser();
 1741  
 1742          pub fn LLVMRustAddPass(PMPassManagerRef, Pass: *c_char) -> bool;
 1743          pub fn LLVMRustCreateTargetMachine(Triple: *c_char,
 1744                                             CPU: *c_char,
 1745                                             Features: *c_char,
 1746                                             ModelCodeGenModel,
 1747                                             RelocRelocMode,
 1748                                             LevelCodeGenOptLevel,
 1749                                             EnableSegstk: bool,
 1750                                             UseSoftFP: bool,
 1751                                             NoFramePointerElim: bool,
 1752                                             FunctionSections: bool,
 1753                                             DataSections: bool) -> TargetMachineRef;
 1754          pub fn LLVMRustDisposeTargetMachine(TTargetMachineRef);
 1755          pub fn LLVMRustAddAnalysisPasses(TTargetMachineRef,
 1756                                           PMPassManagerRef,
 1757                                           MModuleRef);
 1758          pub fn LLVMRustAddBuilderLibraryInfo(PMBPassManagerBuilderRef,
 1759                                               MModuleRef);
 1760          pub fn LLVMRustAddLibraryInfo(PMPassManagerRef, MModuleRef);
 1761          pub fn LLVMRustRunFunctionPassManager(PMPassManagerRef, MModuleRef);
 1762          pub fn LLVMRustWriteOutputFile(TTargetMachineRef,
 1763                                         PMPassManagerRef,
 1764                                         MModuleRef,
 1765                                         Output: *c_char,
 1766                                         FileTypeFileType) -> bool;
 1767          pub fn LLVMRustPrintModule(PMPassManagerRef,
 1768                                     MModuleRef,
 1769                                     Output: *c_char);
 1770          pub fn LLVMRustSetLLVMOptions(Argcc_int, Argv: **c_char);
 1771          pub fn LLVMRustPrintPasses();
 1772          pub fn LLVMRustSetNormalizedTarget(MModuleRef, triple: *c_char);
 1773          pub fn LLVMRustAddAlwaysInlinePass(PPassManagerBuilderRef,
 1774                                             AddLifetimes: bool);
 1775          pub fn LLVMRustLinkInExternalBitcode(MModuleRef,
 1776                                               bc: *c_char,
 1777                                               lensize_t) -> bool;
 1778          pub fn LLVMRustRunRestrictionPass(MModuleRef,
 1779                                            syms: **c_char,
 1780                                            lensize_t);
 1781          pub fn LLVMRustMarkAllFunctionsNounwind(MModuleRef);
 1782  
 1783          pub fn LLVMRustOpenArchive(path: *c_char) -> ArchiveRef;
 1784          pub fn LLVMRustArchiveReadSection(ARArchiveRef, name: *c_char,
 1785                                            out_len: *mut size_t) -> *c_char;
 1786          pub fn LLVMRustDestroyArchive(ARArchiveRef);
 1787  
 1788          pub fn LLVMRustSetDLLExportStorageClass(VValueRef);
 1789          pub fn LLVMVersionMinor() -> c_int;
 1790  
 1791          pub fn LLVMRustGetSectionName(SISectionIteratorRef,
 1792                                        data: *mut *c_char) -> c_int;
 1793      }
 1794  }
 1795  
 1796  pub fn SetInstructionCallConv(instrValueRef, ccCallConv) {
 1797      unsafe {
 1798          llvm::LLVMSetInstructionCallConv(instr, cc as c_uint);
 1799      }
 1800  }
 1801  pub fn SetFunctionCallConv(fn_ValueRef, ccCallConv) {
 1802      unsafe {
 1803          llvm::LLVMSetFunctionCallConv(fn_, cc as c_uint);
 1804      }
 1805  }
 1806  pub fn SetLinkage(globalValueRef, linkLinkage) {
 1807      unsafe {
 1808          llvm::LLVMSetLinkage(global, link as c_uint);
 1809      }
 1810  }
 1811  
 1812  pub fn SetUnnamedAddr(globalValueRef, unnamed: bool) {
 1813      unsafe {
 1814          llvm::LLVMSetUnnamedAddr(global, unnamed as Bool);
 1815      }
 1816  }
 1817  
 1818  pub fn set_thread_local(globalValueRef, is_thread_local: bool) {
 1819      unsafe {
 1820          llvm::LLVMSetThreadLocal(global, is_thread_local as Bool);
 1821      }
 1822  }
 1823  
 1824  pub fn ConstICmp(predIntPredicate, v1ValueRef, v2ValueRef) -> ValueRef {
 1825      unsafe {
 1826          llvm::LLVMConstICmp(pred as c_ushort, v1, v2)
 1827      }
 1828  }
 1829  pub fn ConstFCmp(predRealPredicate, v1ValueRef, v2ValueRef) -> ValueRef {
 1830      unsafe {
 1831          llvm::LLVMConstFCmp(pred as c_ushort, v1, v2)
 1832      }
 1833  }
 1834  
 1835  pub fn SetFunctionAttribute(fn_ValueRef, attrAttribute) {
 1836      unsafe {
 1837          llvm::LLVMAddFunctionAttr(fn_, attr as c_uint)
 1838      }
 1839  }
 1840  /* Memory-managed object interface to type handles. */
 1841  
 1842  pub struct TypeNames {
 1843      named_types: RefCell<HashMap<~str, TypeRef>>,
 1844  }
 1845  
 1846  impl TypeNames {
 1847      pub fn new() -> TypeNames {
 1848          TypeNames {
 1849              named_types: RefCell::new(HashMap::new())
 1850          }
 1851      }
 1852  
 1853      pub fn associate_type(&self, s&str, t&Type) {
 1854          assert!(self.named_types.borrow_mut().insert(s.to_owned(), t.to_ref()));
 1855      }
 1856  
 1857      pub fn find_type(&self, s&str) -> Option<Type> {
 1858          self.named_types.borrow().find_equiv(&s).map(|x| Type::from_ref(*x))
 1859      }
 1860  
 1861      pub fn type_to_str(&self, tyType) -> ~str {
 1862          unsafe {
 1863              let s = llvm::LLVMTypeToString(ty.to_ref());
 1864              let ret = from_c_str(s);
 1865              free(s as *mut c_void);
 1866              ret
 1867          }
 1868      }
 1869  
 1870      pub fn types_to_str(&self, tys&[Type]) -> ~str {
 1871          let strsVec<~str> = tys.iter().map(|t| self.type_to_str(*t)).collect();
 1872          format!("[{}]", strs.connect(","))
 1873      }
 1874  
 1875      pub fn val_to_str(&self, valValueRef) -> ~str {
 1876          unsafe {
 1877              let s = llvm::LLVMValueToString(val);
 1878              let ret = from_c_str(s);
 1879              free(s as *mut c_void);
 1880              ret
 1881          }
 1882      }
 1883  }
 1884  
 1885  /* Memory-managed interface to target data. */
 1886  
 1887  pub struct TargetData {
 1888      pub lltd: TargetDataRef
 1889  }
 1890  
 1891  impl Drop for TargetData {
 1892      fn drop(&mut self) {
 1893          unsafe {
 1894              llvm::LLVMDisposeTargetData(self.lltd);
 1895          }
 1896      }
 1897  }
 1898  
 1899  pub fn mk_target_data(string_rep: &str) -> TargetData {
 1900      TargetData {
 1901          lltd: string_rep.with_c_str(|buf| {
 1902              unsafe { llvm::LLVMCreateTargetData(buf) }
 1903          })
 1904      }
 1905  }
 1906  
 1907  /* Memory-managed interface to object files. */
 1908  
 1909  pub struct ObjectFile {
 1910      pub llof: ObjectFileRef,
 1911  }
 1912  
 1913  impl ObjectFile {
 1914      // This will take ownership of llmb
 1915      pub fn new(llmbMemoryBufferRef) -> Option<ObjectFile> {
 1916          unsafe {
 1917              let llof = llvm::LLVMCreateObjectFile(llmb);
 1918              if llof as int == 0 {
 1919                  // LLVMCreateObjectFile took ownership of llmb
 1920                  return None
 1921              }
 1922  
 1923              Some(ObjectFile {
 1924                  llof: llof,
 1925              })
 1926          }
 1927      }
 1928  }
 1929  
 1930  impl Drop for ObjectFile {
 1931      fn drop(&mut self) {
 1932          unsafe {
 1933              llvm::LLVMDisposeObjectFile(self.llof);
 1934          }
 1935      }
 1936  }
 1937  
 1938  /* Memory-managed interface to section iterators. */
 1939  
 1940  pub struct SectionIter {
 1941      pub llsi: SectionIteratorRef
 1942  }
 1943  
 1944  impl Drop for SectionIter {
 1945      fn drop(&mut self) {
 1946          unsafe {
 1947              llvm::LLVMDisposeSectionIterator(self.llsi);
 1948          }
 1949      }
 1950  }
 1951  
 1952  pub fn mk_section_iter(llofObjectFileRef) -> SectionIter {
 1953      unsafe {
 1954          SectionIter {
 1955              llsi: llvm::LLVMGetSections(llof)
 1956          }
 1957      }
 1958  }


librustc/lib/llvm.rs:249:23-249:23 -NK_AS_STR_TODO- definition:
pub enum Use_opaque {}
pub type UseRef = *Use_opaque;
pub enum TargetData_opaque {}
references:- 7
433:         pub fn LLVMGetUser(U: UseRef) -> ValueRef;
434:         pub fn LLVMGetUsedValue(U: UseRef) -> ValueRef;
librustc/middle/trans/value.rs:
132: impl Use {
133:     pub fn get(&self) -> UseRef {
134:         let Use(v) = *self; v
librustc/lib/llvm.rs:
431:         pub fn LLVMGetFirstUse(Val: ValueRef) -> UseRef;
432:         pub fn LLVMGetNextUse(U: UseRef) -> UseRef;
433:         pub fn LLVMGetUser(U: UseRef) -> ValueRef;


librustc/lib/llvm.rs:271:4-271:4 -NK_AS_STR_TODO- definition:
    pub type DIScope = DIDescriptor;
    pub type DILocation = DIDescriptor;
    pub type DIFile = DIScope;
references:- 22
272:     pub type DILocation = DIDescriptor;
273:     pub type DIFile = DIScope;
274:     pub type DILexicalBlock = DIScope;
275:     pub type DISubprogram = DIScope;
276:     pub type DIType = DIDescriptor;
librustc/middle/trans/debuginfo.rs:
2261: enum DebugLocation {
2262:     KnownLocation { scope: DIScope, line: uint, col: uint },
2263:     UnknownLocation
--
2416:                       scope_stack: &mut Vec<ScopeStackEntry> ,
2417:                       scope_map: &mut HashMap<ast::NodeId, DIScope>,
2418:                       inner_walk: |&CrateContext,
--
2645:                  scope_stack: &mut Vec<ScopeStackEntry> ,
2646:                  scope_map: &mut HashMap<ast::NodeId, DIScope>) {
--
2836:     name: ast::Name,
2837:     scope: DIScope,
2838:     parent: Option<Weak<NamespaceTreeNode>>,


librustc/lib/llvm.rs:259:33-259:33 -NK_AS_STR_TODO- definition:
pub enum TargetMachine_opaque {}
pub type TargetMachineRef = *TargetMachine_opaque;
pub enum Archive_opaque {}
references:- 7
1752:                                            FunctionSections: bool,
1753:                                            DataSections: bool) -> TargetMachineRef;
1754:         pub fn LLVMRustDisposeTargetMachine(T: TargetMachineRef);
--
1761:         pub fn LLVMRustRunFunctionPassManager(PM: PassManagerRef, M: ModuleRef);
1762:         pub fn LLVMRustWriteOutputFile(T: TargetMachineRef,
1763:                                        PM: PassManagerRef,
librustc/back/link.rs:
70:         sess: &Session,
71:         target: lib::llvm::TargetMachineRef,
72:         pm: lib::llvm::PassManagerRef,
--
259:             // used once.
260:             fn with_codegen(tm: TargetMachineRef, llmod: ModuleRef,
261:                             f: |PassManagerRef|) {
librustc/back/lto.rs:
21: pub fn run(sess: &session::Session, llmod: ModuleRef,
22:            tm: TargetMachineRef, reachable: &[~str]) {
23:     if sess.opts.cg.prefer_dynamic {
librustc/lib/llvm.rs:
1753:                                            DataSections: bool) -> TargetMachineRef;
1754:         pub fn LLVMRustDisposeTargetMachine(T: TargetMachineRef);
1755:         pub fn LLVMRustAddAnalysisPasses(T: TargetMachineRef,


librustc/lib/llvm.rs:243:32-243:32 -NK_AS_STR_TODO- definition:
pub enum MemoryBuffer_opaque {}
pub type MemoryBufferRef = *MemoryBuffer_opaque;
pub enum PassManager_opaque {}
references:- 6
1427:         /** Opens an object file. */
1428:         pub fn LLVMCreateObjectFile(MemBuf: MemoryBufferRef) -> ObjectFileRef;
1429:         /** Closes an object file. */
--
1914:     // This will take ownership of llmb
1915:     pub fn new(llmb: MemoryBufferRef) -> Option<ObjectFile> {
1916:         unsafe {


librustc/lib/llvm.rs:268:4-268:4 -NK_AS_STR_TODO- definition:
    pub type DIBuilderRef = *DIBuilder_opaque;
    pub type DIDescriptor = ValueRef;
    pub type DIScope = DIDescriptor;
references:- 29
1505:         pub fn LLVMDIBuilderDispose(Builder: DIBuilderRef);
--
1607:         pub fn LLVMDIBuilderCreateLocalVariable(Builder: DIBuilderRef,
1608:                                                 Tag: c_uint,
--
1649:         pub fn LLVMDIBuilderInsertDeclareBefore(Builder: DIBuilderRef,
1650:                                                 Val: ValueRef,
--
1711:         pub fn LLVMDIBuilderCreateNameSpace(Builder: DIBuilderRef,
1712:                                             Scope: ValueRef,
librustc/middle/trans/debuginfo.rs:
178:     llcontext: ContextRef,
179:     builder: DIBuilderRef,
180:     current_debug_location: Cell<DebugLocation>,
--
2344: fn DIB(cx: &CrateContext) -> DIBuilderRef {
2345:     cx.dbg_cx.get_ref().builder
librustc/lib/llvm.rs:
1546:         pub fn LLVMDIBuilderCreateBasicType(Builder: DIBuilderRef,
1547:                                             Name: *c_char,


librustc/lib/llvm.rs:231:27-231:27 -NK_AS_STR_TODO- definition:
pub enum Context_opaque {}
pub type ContextRef = *Context_opaque;
pub enum Type_opaque {}
references:- 32
librustc/middle/trans/context.rs:
librustc/middle/trans/debuginfo.rs:
librustc/driver/driver.rs:
librustc/lib/llvm.rs:


librustc/lib/llvm.rs:229:26-229:26 -NK_AS_STR_TODO- definition:
pub enum Module_opaque {}
pub type ModuleRef = *Module_opaque;
pub enum Context_opaque {}
references:- 51
librustc/middle/trans/context.rs:
librustc/middle/trans/builder.rs:
librustc/middle/trans/base.rs:
librustc/middle/trans/debuginfo.rs:
librustc/back/link.rs:
librustc/back/lto.rs:
librustc/driver/driver.rs:
librustc/lib/llvm.rs:


librustc/lib/llvm.rs:280:4-280:4 -NK_AS_STR_TODO- definition:
    pub type DIVariable = DIDescriptor;
    pub type DIGlobalVariable = DIDescriptor;
    pub type DIArray = DIDescriptor;
references:- 3
1644:                                                Val: ValueRef,
1645:                                                VarInfo: DIVariable,
1646:                                                InsertAtEnd: BasicBlockRef)
--
1650:                                                 Val: ValueRef,
1651:                                                 VarInfo: DIVariable,
1652:                                                 InsertBefore: ValueRef)


librustc/lib/llvm.rs:1805:2-1805:2 -fn- definition:
}
pub fn SetLinkage(global: ValueRef, link: Linkage) {
    unsafe {
references:- 14
librustc/middle/trans/inline.rs:
70:                                             "address_insignificant") {
71:                         SetLinkage(g, AvailableExternallyLinkage);
72:                     }
librustc/middle/trans/glue.rs:
463:     lib::llvm::SetLinkage(llfn, lib::llvm::InternalLinkage);
464:     ccx.stats.n_glues_created.set(ccx.stats.n_glues_created.get() + 1u);
--
521:             llvm::LLVMSetGlobalConstant(gvar, True);
522:             lib::llvm::SetLinkage(gvar, lib::llvm::InternalLinkage);
523:         }
librustc/middle/trans/common.rs:
565:         llvm::LLVMSetGlobalConstant(g, True);
566:         lib::llvm::SetLinkage(g, lib::llvm::InternalLinkage);
--
593:         llvm::LLVMSetGlobalConstant(g, True);
594:         lib::llvm::SetLinkage(g, lib::llvm::InternalLinkage);
librustc/middle/trans/consts.rs:
113:         llvm::LLVMSetGlobalConstant(gv, True);
114:         SetLinkage(gv, PrivateLinkage);
115:         gv
--
588:                       if store == ast::ExprVstoreMutSlice { False } else { True });
589:                 SetLinkage(gv, PrivateLinkage);
590:                 let p = const_ptrcast(cx, gv, llunitty);
librustc/middle/trans/base.rs:
1891:                         if !ccx.reachable.contains(&id) {
1892:                             lib::llvm::SetLinkage(g, lib::llvm::InternalLinkage);
1893:                         }
--
2059:     if !foreign && !ccx.reachable.contains(&id) {
2060:         lib::llvm::SetLinkage(val, lib::llvm::InternalLinkage);
2061:     }
librustc/middle/trans/meth.rs:
480:         llvm::LLVMSetGlobalConstant(vt_gvar, lib::llvm::True);
481:         lib::llvm::SetLinkage(vt_gvar, lib::llvm::InternalLinkage);
482:         vt_gvar
librustc/middle/trans/foreign.rs:
169:                 });
170:                 lib::llvm::SetLinkage(g2, lib::llvm::InternalLinkage);
171:                 llvm::LLVMSetInitializer(g2, g1);
librustc/middle/trans/base.rs:
1698:     if !ccx.reachable.contains(&node_id) {
1699:         lib::llvm::SetLinkage(llfn, lib::llvm::InternalLinkage);
1700:     }


librustc/lib/llvm.rs:276:4-276:4 -NK_AS_STR_TODO- definition:
    pub type DIType = DIDescriptor;
    pub type DIBasicType = DIType;
    pub type DIDerivedType = DIType;
references:- 27
276:     pub type DIType = DIDescriptor;
277:     pub type DIBasicType = DIType;
278:     pub type DIDerivedType = DIType;
--
1630:                                              Subscripts: DIArray)
1631:                                              -> DIType;
librustc/middle/trans/debuginfo.rs:
186:     // members only set once:
187:     composite_types_completed: RefCell<HashSet<DIType>>,
188: }
--
2086:     let mut signature_metadata: Vec<DIType> =
2087:         Vec::with_capacity(signature.inputs.len() + 1);
--
2144:                  usage_site_span: Span)
2145:               -> DIType {
2146:     let cache_id = cache_id_for_type(t);
--
2155:                                       type_in_box: ty::t)
2156:                                    -> DIType {
2157:         let content_type_name: &str = ppaux::ty_to_str(cx.tcx(), type_in_box);


librustc/lib/llvm.rs:273:4-273:4 -NK_AS_STR_TODO- definition:
    pub type DIFile = DIScope;
    pub type DILexicalBlock = DIScope;
    pub type DISubprogram = DIScope;
references:- 17
1521:                                        Directory: *c_char)
1522:                                        -> DIFile;
--
1610:                                                 Name: *c_char,
1611:                                                 File: DIFile,
1612:                                                 LineNo: c_uint,
librustc/middle/trans/debuginfo.rs:
1397:     containing_scope: DIScope,
1398:     file_metadata: DIFile,
1399:     span: Span,
--
1470:                          containing_scope: DIScope,
1471:                          file_metadata: DIFile,
1472:                          span: Span)
--
1814:                       containing_scope: DIScope,
1815:                       file_metadata: DIFile,
1816:                       definition_span: Span)
librustc/lib/llvm.rs:
1577:                                              Name: *c_char,
1578:                                              File: DIFile,
1579:                                              LineNo: c_uint,


librustc/lib/llvm.rs:245:31-245:31 -NK_AS_STR_TODO- definition:
pub enum PassManager_opaque {}
pub type PassManagerRef = *PassManager_opaque;
pub enum PassManagerBuilder_opaque {}
references:- 57
librustc/back/link.rs:


librustc/lib/llvm.rs:282:4-282:4 -NK_AS_STR_TODO- definition:
    pub type DIArray = DIDescriptor;
    pub type DISubrange = DIDescriptor;
    pub enum DIDescriptorFlags {
references:- 8
1629:                                              Ty: DIType,
1630:                                              Subscripts: DIArray)
1631:                                              -> DIType;
--
1640:                                              Count: c_uint)
1641:                                              -> DIArray;
librustc/middle/trans/debuginfo.rs:
834:                                name_to_append_suffix_to: &mut StrBuf)
835:                                -> DIArray {
836:         let self_type = match param_substs {
--
950: fn create_DIArray(builder: DIBuilderRef, arr: &[DIDescriptor]) -> DIArray {
951:     return unsafe {


librustc/lib/llvm.rs:1811:1-1811:1 -fn- definition:
pub fn SetUnnamedAddr(global: ValueRef, unnamed: bool) {
    unsafe {
        llvm::LLVMSetUnnamedAddr(global, unnamed as Bool);
references:- 2
librustc/middle/trans/base.rs:
192:     // Function addresses in Rust are never significant, allowing functions to be merged.
193:     lib::llvm::SetUnnamedAddr(llfn, true);
194:     set_split_stack(llfn);
--
1902:                             }
1903:                             lib::llvm::SetUnnamedAddr(g, true);


librustc/lib/llvm.rs:261:27-261:27 -NK_AS_STR_TODO- definition:
pub enum Archive_opaque {}
pub type ArchiveRef = *Archive_opaque;
pub mod debuginfo {
references:- 4
1783:         pub fn LLVMRustOpenArchive(path: *c_char) -> ArchiveRef;
1784:         pub fn LLVMRustArchiveReadSection(AR: ArchiveRef, name: *c_char,
1785:                                           out_len: *mut size_t) -> *c_char;
1786:         pub fn LLVMRustDestroyArchive(AR: ArchiveRef);
librustc/back/archive.rs:
35: pub struct ArchiveRO {
36:     ptr: ArchiveRef,
37: }
librustc/lib/llvm.rs:
1783:         pub fn LLVMRustOpenArchive(path: *c_char) -> ArchiveRef;
1784:         pub fn LLVMRustArchiveReadSection(AR: ArchiveRef, name: *c_char,


librustc/lib/llvm.rs:255:35-255:35 -NK_AS_STR_TODO- definition:
pub enum SectionIterator_opaque {}
pub type SectionIteratorRef = *SectionIterator_opaque;
pub enum Pass_opaque {}
references:- 8
1445:         /** Returns the current section contents as a string buffer. */
1446:         pub fn LLVMGetSectionContents(SI: SectionIteratorRef) -> *c_char;
--
1791:         pub fn LLVMRustGetSectionName(SI: SectionIteratorRef,
1792:                                       data: *mut *c_char) -> c_int;
--
1940: pub struct SectionIter {
1941:     pub llsi: SectionIteratorRef
1942: }


librustc/lib/llvm.rs:235:25-235:25 -NK_AS_STR_TODO- definition:
pub enum Value_opaque {}
pub type ValueRef = *Value_opaque;
pub enum BasicBlock_opaque {}
references:- 1436
librustc/middle/trans/monomorphize.rs:
librustc/middle/trans/controlflow.rs:
librustc/middle/trans/glue.rs:
librustc/middle/trans/datum.rs:
librustc/middle/trans/callee.rs:
librustc/middle/trans/expr.rs:
librustc/middle/trans/common.rs:
librustc/middle/trans/context.rs:
librustc/middle/trans/consts.rs:
librustc/middle/trans/build.rs:
librustc/middle/trans/builder.rs:
librustc/middle/trans/base.rs:
librustc/middle/trans/_match.rs:
librustc/middle/trans/closure.rs:
librustc/middle/trans/tvec.rs:
librustc/middle/trans/meth.rs:
librustc/middle/trans/foreign.rs:
librustc/middle/trans/intrinsic.rs:
librustc/middle/trans/reflect.rs:
librustc/middle/trans/debuginfo.rs:
librustc/middle/trans/machine.rs:
librustc/middle/trans/adt.rs:
librustc/middle/trans/value.rs:
librustc/middle/trans/llrepr.rs:
librustc/middle/trans/cleanup.rs:
librustc/middle/trans/builder.rs:


librustc/lib/llvm.rs:195:22-195:22 -enum- definition:
// Inline Asm Dialect
pub enum AsmDialect {
    AD_ATT   = 0,
references:- 2
librustc/middle/trans/builder.rs:
777:                          volatile: bool, alignstack: bool,
778:                          dia: AsmDialect) -> ValueRef {
779:         self.count_insn("inlineasm");
librustc/middle/trans/build.rs:
676:                      volatile: bool, alignstack: bool,
677:                      dia: AsmDialect) -> ValueRef {
678:     B(cx).inline_asm_call(asm, cons, inputs, output, volatile, alignstack, dia)


librustc/lib/llvm.rs:278:4-278:4 -NK_AS_STR_TODO- definition:
    pub type DIDerivedType = DIType;
    pub type DICompositeType = DIDerivedType;
    pub type DIVariable = DIDescriptor;
references:- 3
1584:                                              Ty: DIType)
1585:                                              -> DIDerivedType;


librustc/lib/llvm.rs:275:4-275:4 -NK_AS_STR_TODO- definition:
    pub type DISubprogram = DIScope;
    pub type DIType = DIDescriptor;
    pub type DIBasicType = DIType;
references:- 3
1543:                                            Decl: ValueRef)
1544:                                            -> DISubprogram;
librustc/middle/trans/debuginfo.rs:
243:     scope_map: RefCell<HashMap<ast::NodeId, DIScope>>,
244:     fn_metadata: DISubprogram,
245:     argument_counter: Cell<uint>,
--
2383:                       fn_entry_block: &ast::Block,
2384:                       fn_metadata: DISubprogram,
2385:                       scope_map: &mut HashMap<ast::NodeId, DIScope>) {


librustc/lib/llvm.rs:152:11-152:11 -enum- definition:
pub enum AtomicBinOp {
    Xchg = 0,
    Add  = 1,
references:- 3
librustc/middle/trans/build.rs:
820: }
821: pub fn AtomicRMW(cx: &Block, op: AtomicBinOp,
822:                  dst: ValueRef, src: ValueRef,
librustc/middle/trans/builder.rs:
958:     }
959:     pub fn atomic_rmw(&self, op: AtomicBinOp,
960:                      dst: ValueRef, src: ValueRef,
librustc/lib/llvm.rs:
1268:         pub fn LLVMBuildAtomicRMW(B: BuilderRef,
1269:                                   Op: AtomicBinOp,
1270:                                   LHS: ValueRef,


librustc/lib/llvm.rs:50:57-50:57 -enum- definition:
// they've been removed in upstream LLVM commit r203866.
pub enum Linkage {
    ExternalLinkage = 0,
references:- 2
librustc/middle/trans/foreign.rs:
107: pub fn llvm_linkage_by_name(name: &str) -> Option<Linkage> {
108:     // Use the names from src/llvm/docs/LangRef.rst here. Most types are only
librustc/lib/llvm.rs:
1805: }
1806: pub fn SetLinkage(global: ValueRef, link: Linkage) {
1807:     unsafe {


librustc/lib/llvm.rs:1908:1-1908:1 -struct- definition:
pub struct ObjectFile {
    pub llof: ObjectFileRef,
}
references:- 4
1923:             Some(ObjectFile {
1924:                 llof: llof,
--
1930: impl Drop for ObjectFile {
1931:     fn drop(&mut self) {


librustc/lib/llvm.rs:251:30-251:30 -NK_AS_STR_TODO- definition:
pub enum TargetData_opaque {}
pub type TargetDataRef = *TargetData_opaque;
pub enum ObjectFile_opaque {}
references:- 11
1319:          */
1320:         pub fn LLVMCallFrameAlignmentOfType(TD: TargetDataRef, Ty: TypeRef)
1321:                                             -> c_uint;
--
1323:         /** Disposes target data. */
1324:         pub fn LLVMDisposeTargetData(TD: TargetDataRef);
--
1887: pub struct TargetData {
1888:     pub lltd: TargetDataRef
1889: }


librustc/lib/llvm.rs:1834:1-1834:1 -fn- definition:
pub fn SetFunctionAttribute(fn_: ValueRef, attr: Attribute) {
    unsafe {
        llvm::LLVMAddFunctionAttr(fn_, attr as c_uint)
references:- 6
librustc/middle/trans/base.rs:
413: pub fn set_no_inline(f: ValueRef) {
414:     lib::llvm::SetFunctionAttribute(f, lib::llvm::NoInlineAttribute)
415: }
--
452: pub fn set_always_inline(f: ValueRef) {
453:     lib::llvm::SetFunctionAttribute(f, lib::llvm::AlwaysInlineAttribute)
454: }


librustc/lib/llvm.rs:237:30-237:30 -NK_AS_STR_TODO- definition:
pub enum BasicBlock_opaque {}
pub type BasicBlockRef = *BasicBlock_opaque;
pub enum Builder_opaque {}
references:- 80
librustc/middle/trans/common.rs:
librustc/middle/trans/build.rs:
librustc/middle/trans/builder.rs:
librustc/middle/trans/base.rs:
librustc/middle/trans/_match.rs:
librustc/middle/trans/basic_block.rs:
librustc/middle/trans/cleanup.rs:
librustc/middle/trans/builder.rs:


librustc/lib/llvm.rs:241:35-241:35 -NK_AS_STR_TODO- definition:
pub enum ExecutionEngine_opaque {}
pub type ExecutionEngineRef = *ExecutionEngine_opaque;
pub enum MemoryBuffer_opaque {}
references:- 2
410:         pub fn LLVMGetPointerAddressSpace(PointerTy: TypeRef) -> c_uint;
411:         pub fn LLVMGetPointerToGlobal(EE: ExecutionEngineRef, V: ValueRef)
412:                                       -> *();
--
822:         pub fn LLVMDisposeBuilder(Builder: BuilderRef);
823:         pub fn LLVMDisposeExecutionEngine(EE: ExecutionEngineRef);


librustc/lib/llvm.rs:23:23-23:23 -NK_AS_STR_TODO- definition:
pub type Opcode = u32;
pub type Bool = c_uint;
pub static True: Bool = 1 as Bool;
references:- 58
librustc/middle/trans/common.rs:
librustc/middle/trans/consts.rs:
librustc/middle/trans/build.rs:
librustc/middle/trans/builder.rs:
librustc/middle/trans/type_.rs:
librustc/lib/llvm.rs:


librustc/lib/llvm.rs:31:16-31:16 -enum- definition:
pub enum CallConv {
    CCallConv = 0,
    FastCallConv = 8,
references:- 11
1796: pub fn SetInstructionCallConv(instr: ValueRef, cc: CallConv) {
1797:     unsafe {
--
1800: }
1801: pub fn SetFunctionCallConv(fn_: ValueRef, cc: CallConv) {
1802:     unsafe {
librustc/middle/trans/build.rs:
687: pub fn CallWithConv(cx: &Block, fn_: ValueRef, args: &[ValueRef], conv: CallConv,
688:                     attributes: &[(uint, lib::llvm::Attribute)]) -> ValueRef {
librustc/middle/trans/builder.rs:
821:     pub fn call_with_conv(&self, llfn: ValueRef, args: &[ValueRef],
822:                           conv: CallConv, attributes: &[(uint, lib::llvm::Attribute)]) -> ValueRef {
823:         self.count_insn("callwithconv");
librustc/middle/trans/base.rs:
208: pub fn get_extern_fn(externs: &mut ExternMap, llmod: ModuleRef,
209:                      name: &str, cc: lib::llvm::CallConv,
210:                      ty: Type, output: ty::t) -> ValueRef {
--
1734:                           node_id: ast::NodeId,
1735:                           cc: lib::llvm::CallConv,
1736:                           fn_ty: Type,
librustc/middle/trans/foreign.rs:
75: pub fn llvm_calling_convention(ccx: &CrateContext,
76:                                abi: Abi) -> Option<CallConv> {
77:     let os = ccx.sess().targ_cfg.os;
librustc/lib/llvm.rs:
32: pub enum CallConv {


librustc/lib/llvm.rs:65:19-65:19 -enum- definition:
pub enum Attribute {
    ZExtAttribute = 1 << 0,
    SExtAttribute = 1 << 1,
references:- 14
66: pub enum Attribute {
--
1835: pub fn SetFunctionAttribute(fn_: ValueRef, attr: Attribute) {
1836:     unsafe {
librustc/middle/trans/build.rs:
687: pub fn CallWithConv(cx: &Block, fn_: ValueRef, args: &[ValueRef], conv: CallConv,
688:                     attributes: &[(uint, lib::llvm::Attribute)]) -> ValueRef {
689:     if cx.unreachable.get() { return _UndefReturn(cx, fn_); }
librustc/middle/trans/builder.rs:
800:     pub fn call(&self, llfn: ValueRef, args: &[ValueRef],
801:                 attributes: &[(uint, lib::llvm::Attribute)]) -> ValueRef {
802:         self.count_insn("call");
--
821:     pub fn call_with_conv(&self, llfn: ValueRef, args: &[ValueRef],
822:                           conv: CallConv, attributes: &[(uint, lib::llvm::Attribute)]) -> ValueRef {
823:         self.count_insn("callwithconv");
librustc/middle/trans/base.rs:
885:               llargs: Vec<ValueRef> ,
886:               attributes: &[(uint, lib::llvm::Attribute)],
887:               call_info: Option<NodeInfo>)
librustc/middle/trans/cabi.rs:
51:                             pad: option::Option<Type>,
52:                             attr: option::Option<Attribute>) -> ArgType {
53:         ArgType {
--
62:     pub fn indirect(ty: Type, attr: option::Option<Attribute>) -> ArgType {
63:         ArgType {
librustc/middle/trans/cabi_x86_64.rs:
339:                  is_mem_cls: |cls: &[RegClass]| -> bool,
340:                  attr: Attribute)
341:                  -> ArgType {
librustc/middle/trans/cabi.rs:
45:     /// LLVM attribute of argument
46:     pub attr: option::Option<Attribute>
47: }


librustc/lib/llvm.rs:253:30-253:30 -NK_AS_STR_TODO- definition:
pub enum ObjectFile_opaque {}
pub type ObjectFileRef = *ObjectFile_opaque;
pub enum SectionIterator_opaque {}
references:- 6
1429:         /** Closes an object file. */
1430:         pub fn LLVMDisposeObjectFile(ObjFile: ObjectFileRef);
--
1952: pub fn mk_section_iter(llof: ObjectFileRef) -> SectionIter {
1953:     unsafe {


librustc/lib/llvm.rs:1828:2-1828:2 -fn- definition:
}
pub fn ConstFCmp(pred: RealPredicate, v1: ValueRef, v2: ValueRef) -> ValueRef {
    unsafe {
references:- 6
librustc/middle/trans/consts.rs:
379:               ast::BiGt     => {
380:                   if is_float { ConstFCmp(RealOGT, te1, te2) }
381:                   else        {


librustc/lib/llvm.rs:1823:1-1823:1 -fn- definition:
pub fn ConstICmp(pred: IntPredicate, v1: ValueRef, v2: ValueRef) -> ValueRef {
    unsafe {
        llvm::LLVMConstICmp(pred as c_ushort, v1, v2)
references:- 10
librustc/middle/trans/consts.rs:
381:                   else        {
382:                       if signed { ConstICmp(IntSGT, te1, te2) }
383:                       else      { ConstICmp(IntUGT, te1, te2) }
384:                   }


librustc/lib/llvm.rs:22:1-22:1 -NK_AS_STR_TODO- definition:
pub type Opcode = u32;
pub type Bool = c_uint;
pub static True: Bool = 1 as Bool;
references:- 6
1152:         pub fn LLVMBuildCast(B: BuilderRef,
1153:                              Op: Opcode,
1154:                              Val: ValueRef,
librustc/middle/trans/build.rs:
271: pub fn BinOp(cx: &Block, op: Opcode, lhs: ValueRef, rhs: ValueRef)
272:           -> ValueRef {
--
579: pub fn Cast(cx: &Block, op: Opcode, val: ValueRef, dest_ty: Type, _: *u8)
580:      -> ValueRef {
librustc/middle/trans/builder.rs:
688:     pub fn cast(&self, op: Opcode, val: ValueRef, dest_ty: Type) -> ValueRef {
689:         self.count_insn("cast");


librustc/lib/llvm.rs:109:40-109:40 -enum- definition:
// enum for the LLVM RealPredicate type
pub enum RealPredicate {
    RealPredicateFalse = 0,
references:- 3
1828: }
1829: pub fn ConstFCmp(pred: RealPredicate, v1: ValueRef, v2: ValueRef) -> ValueRef {
1830:     unsafe {
librustc/middle/trans/build.rs:
620: pub fn FCmp(cx: &Block, op: RealPredicate, lhs: ValueRef, rhs: ValueRef)
621:      -> ValueRef {
librustc/middle/trans/builder.rs:
725:     pub fn fcmp(&self, op: RealPredicate, lhs: ValueRef, rhs: ValueRef) -> ValueRef {
726:         self.count_insn("fcmp");


librustc/lib/llvm.rs:279:4-279:4 -NK_AS_STR_TODO- definition:
    pub type DICompositeType = DIDerivedType;
    pub type DIVariable = DIDescriptor;
    pub type DIGlobalVariable = DIDescriptor;
references:- 13
1572:                                              UniqueId: *c_char)
1573:                                              -> DICompositeType;
librustc/middle/trans/debuginfo.rs:
1316:     fn finalize(&self, cx: &CrateContext) -> DICompositeType {
1317:         match *self {
--
1816:                       definition_span: Span)
1817:                    -> DICompositeType {
1818:     let loc = span_start(cx, definition_span);
--
2081:                             span: Span)
2082:                          -> DICompositeType {
2083:     let loc = span_start(cx, span);
librustc/lib/llvm.rs:
1526:                                                  ParameterTypes: DIArray)
1527:                                                  -> DICompositeType;


librustc/lib/llvm.rs:202:11-202:11 -enum- definition:
pub enum CodeGenOptLevel {
    CodeGenLevelNone = 0,
    CodeGenLevelLess = 1,
references:- 5
1747:                                            Reloc: RelocMode,
1748:                                            Level: CodeGenOptLevel,
1749:                                            EnableSegstk: bool,
librustc/back/link.rs:
437:                                    llmod: ModuleRef,
438:                                    opt: lib::llvm::CodeGenOptLevel) {
439:         // Create the PassManagerBuilder for LLVM. We configure it with


librustc/lib/llvm.rs:167:11-167:11 -enum- definition:
pub enum AtomicOrdering {
    NotAtomic = 0,
    Unordered = 1,
references:- 18
1271:                                   RHS: ValueRef,
1272:                                   Order: AtomicOrdering,
1273:                                   SingleThreaded: Bool)
--
1276:         pub fn LLVMBuildAtomicFence(B: BuilderRef, Order: AtomicOrdering);
librustc/middle/trans/build.rs:
817:                      order: AtomicOrdering,
818:                      failure_order: AtomicOrdering) -> ValueRef {
819:     B(cx).atomic_cmpxchg(dst, cmp, src, order, failure_order)
--
822:                  dst: ValueRef, src: ValueRef,
823:                  order: AtomicOrdering) -> ValueRef {
824:     B(cx).atomic_rmw(op, dst, src, order)
librustc/middle/trans/builder.rs:
960:                      dst: ValueRef, src: ValueRef,
961:                      order: AtomicOrdering) -> ValueRef {
962:         unsafe {
--
967:     pub fn atomic_fence(&self, order: AtomicOrdering) {
968:         unsafe {


librustc/lib/llvm.rs:180:11-180:11 -enum- definition:
pub enum FileType {
    AssemblyFile = 0,
    ObjectFile = 1
references:- 2
1765:                                        Output: *c_char,
1766:                                        FileType: FileType) -> bool;
1767:         pub fn LLVMRustPrintModule(PM: PassManagerRef,
librustc/back/link.rs:
74:         output: &Path,
75:         file_type: lib::llvm::FileType) {
76:     unsafe {


librustc/lib/llvm.rs:233:24-233:24 -NK_AS_STR_TODO- definition:
pub enum Type_opaque {}
pub type TypeRef = *Type_opaque;
pub enum Value_opaque {}
references:- 132
librustc/middle/trans/type_.rs:
librustc/lib/llvm.rs:


librustc/lib/llvm.rs:239:27-239:27 -NK_AS_STR_TODO- definition:
pub enum Builder_opaque {}
pub type BuilderRef = *Builder_opaque;
pub enum ExecutionEngine_opaque {}
references:- 107
librustc/middle/trans/common.rs:
librustc/middle/trans/builder.rs:
librustc/lib/llvm.rs:


librustc/lib/llvm.rs:132:11-132:11 -enum- definition:
pub enum TypeKind {
    Void      = 0,
    Half      = 1,
references:- 5
354:         /** See llvm::LLVMTypeKind::getTypeID. */
355:         pub fn LLVMGetTypeKind(Ty: TypeRef) -> TypeKind;
librustc/middle/trans/type_.rs:
240:     pub fn kind(&self) -> TypeKind {
241:         unsafe {


librustc/lib/llvm.rs:247:38-247:38 -NK_AS_STR_TODO- definition:
pub enum PassManagerBuilder_opaque {}
pub type PassManagerBuilderRef = *PassManagerBuilder_opaque;
pub enum Use_opaque {}
references:- 13
1772:         pub fn LLVMRustSetNormalizedTarget(M: ModuleRef, triple: *c_char);
1773:         pub fn LLVMRustAddAlwaysInlinePass(P: PassManagerBuilderRef,
1774:                                            AddLifetimes: bool);


librustc/lib/llvm.rs:1886:1-1886:1 -struct- definition:
pub struct TargetData {
    pub lltd: TargetDataRef
}
references:- 4
1899: pub fn mk_target_data(string_rep: &str) -> TargetData {
1900:     TargetData {
1901:         lltd: string_rep.with_c_str(|buf| {
librustc/middle/trans/context.rs:
56:     pub metadata_llmod: ModuleRef,
57:     pub td: TargetData,
58:     pub tn: TypeNames,
librustc/lib/llvm.rs:
1891: impl Drop for TargetData {
1892:     fn drop(&mut self) {


librustc/lib/llvm.rs:270:4-270:4 -NK_AS_STR_TODO- definition:
    pub type DIDescriptor = ValueRef;
    pub type DIScope = DIDescriptor;
    pub type DILocation = DIDescriptor;
references:- 18
1575:         pub fn LLVMDIBuilderCreateMemberType(Builder: DIBuilderRef,
1576:                                              Scope: DIDescriptor,
1577:                                              Name: *c_char,
--
1638:         pub fn LLVMDIBuilderGetOrCreateArray(Builder: DIBuilderRef,
1639:                                              Ptr: *DIDescriptor,
1640:                                              Count: c_uint)
librustc/middle/trans/debuginfo.rs:
950: fn create_DIArray(builder: DIBuilderRef, arr: &[DIDescriptor]) -> DIArray {
951:     return unsafe {
--
1775:     let member_metadata: Vec<DIDescriptor> = member_descriptions
1776:         .iter()
librustc/lib/llvm.rs:
271:     pub type DIScope = DIDescriptor;
272:     pub type DILocation = DIDescriptor;
273:     pub type DIFile = DIScope;


librustc/lib/llvm.rs:95:39-95:39 -enum- definition:
// enum for the LLVM IntPredicate type
pub enum IntPredicate {
    IntEQ = 32,
references:- 3
1824: pub fn ConstICmp(pred: IntPredicate, v1: ValueRef, v2: ValueRef) -> ValueRef {
1825:     unsafe {
librustc/middle/trans/build.rs:
609: /* Comparisons */
610: pub fn ICmp(cx: &Block, op: IntPredicate, lhs: ValueRef, rhs: ValueRef)
611:      -> ValueRef {
librustc/middle/trans/builder.rs:
717:     /* Comparisons */
718:     pub fn icmp(&self, op: IntPredicate, lhs: ValueRef, rhs: ValueRef) -> ValueRef {
719:         self.count_insn("icmp");


librustc/lib/llvm.rs:1841:1-1841:1 -struct- definition:
pub struct TypeNames {
    named_types: RefCell<HashMap<~str, TypeRef>>,
}
references:- 4
1847:     pub fn new() -> TypeNames {
1848:         TypeNames {
1849:             named_types: RefCell::new(HashMap::new())
librustc/middle/trans/context.rs:
57:     pub td: TargetData,
58:     pub tn: TypeNames,
59:     pub externs: RefCell<ExternMap>,


librustc/lib/llvm.rs:1939:1-1939:1 -struct- definition:
pub struct SectionIter {
    pub llsi: SectionIteratorRef
}
references:- 3
1953:     unsafe {
1954:         SectionIter {
1955:             llsi: llvm::LLVMGetSections(llof)