MCPcopy Create free account
hub / github.com/llir/llvm / Type

Method Type

ir/constant/const_array.go:41–48  ·  view source on GitHub ↗

Type returns the type of the constant.

()

Source from the content-addressed store, hash-verified

39
40// Type returns the type of the constant.
41func (c *Array) Type() types.Type {
42 // Cache type if not present.
43 if c.Typ == nil {
44 elemType := c.Elems[0].Type()
45 c.Typ = types.NewArray(uint64(len(c.Elems)), elemType)
46 }
47 return c.Typ
48}
49
50// Ident returns the identifier associated with the constant.
51func (c *Array) Ident() string {

Callers 2

NewArrayFunction · 0.95
StringMethod · 0.95

Calls 2

NewArrayFunction · 0.92
TypeMethod · 0.65

Tested by

no test coverage detected