MCPcopy Create free account
hub / github.com/google/gapid / AlignOf

Method AlignOf

core/codegen/module.go:493–495  ·  view source on GitHub ↗

AlignOf returns the alignment of the type in bytes.

(ty Type)

Source from the content-addressed store, hash-verified

491
492// AlignOf returns the alignment of the type in bytes.
493func (m *Module) AlignOf(ty Type) Const {
494 return m.Scalar(uint64((ty.AlignInBits() + 7) / 8))
495}
496
497// OffsetOf returns the field offset in bytes.
498func (m *Module) OffsetOf(ty *Struct, name string) Const {

Callers

nothing calls this directly

Calls 2

ScalarMethod · 0.95
AlignInBitsMethod · 0.65

Tested by

no test coverage detected