func (td TargetData) PreferredAlignment(g Value) int {
	return int(C.LLVMPreferredAlignmentOfGlobal(td.C, g.C))
}
Computes the preferred alignment of a global variable in bytes for a target.
See the method llvm::TargetData::getPreferredAlignment.
package llvm
import "C"
import "unsafe"
import "os"
type (
	TargetData struct {
		C C.LLVMTargetDataRef
	}
	StructLayout struct {
		C C.LLVMStructLayoutRef
	}
	ByteOrdering C.enum_LLVMByteOrdering
)
const (
	BigEndian    = C.LLVMBigEndian
	LittleEndian = C.LLVMLittleEndian
)
func InitializeMBlazeTargetInfo()     { C.LLVMInitializeMBlazeTargetInfo() }
func InitializeCppBackendTargetInfo() { C.LLVMInitializeCppBackendTargetInfo() }
func InitializeCBackendTargetInfo()   { C.LLVMInitializeCBackendTargetInfo() }
func InitializeBlackfinTargetInfo()   { C.LLVMInitializeBlackfinTargetInfo() }
func InitializeSystemZTargetInfo()    { C.LLVMInitializeSystemZTargetInfo() }
func InitializeMSP430TargetInfo()     { C.LLVMInitializeMSP430TargetInfo() }
func InitializeXCoreTargetInfo()      { C.LLVMInitializeXCoreTargetInfo() }
func InitializePIC16TargetInfo()      { C.LLVMInitializePIC16TargetInfo() }
func InitializeCellSPUTargetInfo()    { C.LLVMInitializeCellSPUTargetInfo() }
func InitializeMipsTargetInfo()       { C.LLVMInitializeMipsTargetInfo() }
func InitializeARMTargetInfo()        { C.LLVMInitializeARMTargetInfo() }
func InitializeAlphaTargetInfo()      { C.LLVMInitializeAlphaTargetInfo() }
func InitializePowerPCTargetInfo()    { C.LLVMInitializePowerPCTargetInfo() }
func InitializeSparcTargetInfo()      { C.LLVMInitializeSparcTargetInfo() }
func InitializeX86TargetInfo()        { C.LLVMInitializeX86TargetInfo() }
func InitializeMBlazeTarget()     { C.LLVMInitializeMBlazeTarget() }
func InitializeCppBackendTarget() { C.LLVMInitializeCppBackendTarget() }
func InitializeCBackendTarget()   { C.LLVMInitializeCBackendTarget() }
func InitializeBlackfinTarget()   { C.LLVMInitializeBlackfinTarget() }
func InitializeSystemZTarget()    { C.LLVMInitializeSystemZTarget() }
func InitializeMSP430Target()     { C.LLVMInitializeMSP430Target() }
func InitializeXCoreTarget()      { C.LLVMInitializeXCoreTarget() }
func InitializePIC16Target()      { C.LLVMInitializePIC16Target() }
func InitializeCellSPUTarget()    { C.LLVMInitializeCellSPUTarget() }
func InitializeMipsTarget()       { C.LLVMInitializeMipsTarget() }
func InitializeARMTarget()        { C.LLVMInitializeARMTarget() }
func InitializeAlphaTarget()      { C.LLVMInitializeAlphaTarget() }
func InitializePowerPCTarget()    { C.LLVMInitializePowerPCTarget() }
func InitializeSparcTarget()      { C.LLVMInitializeSparcTarget() }
func InitializeX86Target()        { C.LLVMInitializeX86Target() }
func InitializeAllTargetInfos() { C.LLVMInitializeAllTargetInfos() }
func InitializeAllTargets() { C.LLVMInitializeAllTargets() }
var initializeNativeTargetError = os.NewError("Failed to initialize native target")
func InitializeNativeTarget() os.Error {
	fail := C.LLVMInitializeNativeTarget()
	if fail == 0 {
		return nil
	}
	return initializeNativeTargetError
}
func NewTargetData(rep string) (td TargetData) {
	crep := C.CString(rep)
	td.C = C.LLVMCreateTargetData(crep)
	C.free(unsafe.Pointer(crep))
	return
}
func (pm PassManager) Add(td TargetData) {
	C.LLVMAddTargetData(td.C, pm.C)
}
func (td TargetData) String() (s string) {
	cmsg := C.LLVMCopyStringRepOfTargetData(td.C)
	s = C.GoString(cmsg)
	C.LLVMDisposeMessage(cmsg)
	return
}
func (td TargetData) ByteOrder() ByteOrdering { return ByteOrdering(C.LLVMByteOrder(td.C)) }
func (td TargetData) PointerSize() int { return int(C.LLVMPointerSize(td.C)) }
func (td TargetData) IntPtrType() (t Type) { t.C = C.LLVMIntPtrType(td.C); return }
func (td TargetData) TypeSizeInBits(t Type) uint64 {
	return uint64(C.LLVMSizeOfTypeInBits(td.C, t.C))
}
func (td TargetData) TypeStoreSize(t Type) uint64 {
	return uint64(C.LLVMStoreSizeOfType(td.C, t.C))
}
func (td TargetData) TypeAllocSize(t Type) uint64 {
	return uint64(C.LLVMABISizeOfType(td.C, t.C))
}
func (td TargetData) ABITypeAlignment(t Type) int {
	return int(C.LLVMABIAlignmentOfType(td.C, t.C))
}
func (td TargetData) CallFrameTypeAlignment(t Type) int {
	return int(C.LLVMCallFrameAlignmentOfType(td.C, t.C))
}
func (td TargetData) PrefTypeAlignment(t Type) int {
	return int(C.LLVMPreferredAlignmentOfType(td.C, t.C))
}