github.com/axw/llgo@v0.0.0-20160805011314-95b5fe4dca20/irgen/types.go (about)

     1  //===- types.go - convenience functions for types -------------------------===//
     2  //
     3  //                     The LLVM Compiler Infrastructure
     4  //
     5  // This file is distributed under the University of Illinois Open Source
     6  // License. See LICENSE.TXT for details.
     7  //
     8  //===----------------------------------------------------------------------===//
     9  //
    10  // This file implements convenience functions for dealing with types.
    11  //
    12  //===----------------------------------------------------------------------===//
    13  
    14  package irgen
    15  
    16  import (
    17  	"llvm.org/llgo/third_party/gotools/go/types"
    18  )
    19  
    20  func deref(t types.Type) types.Type {
    21  	return t.Underlying().(*types.Pointer).Elem()
    22  }