Exemple #1
0
        public LlvmFunction(LlvmModule parent, LLVMValueRef reference) : base(reference)
        {
            this.Deleted = false;

            // TODO: Need to verify reference is a function.
            this.Parent = parent;

            // Retrieve, wrap and convert blocks to a dictionary.
            this.blocks = LLVM.GetBasicBlocks(this.reference)
                          .Wrap <LlvmBlock, LLVMBasicBlockRef>((LLVMBasicBlockRef value) => new LlvmBlock(this, value))
                          .ToDictionary <LlvmBlock>();
        }
Exemple #2
0
 public static LlvmModule Create()
 {
     return(LlvmModule.Create(SpecialName.Entry));
 }