@Test public void testGetAlignment() { assertEquals(4, new DataLayout("i386-unknown-linux").getAlignment(I8_PTR)); assertEquals(8, new DataLayout("x86_64-unknown-linux").getAlignment(I8_PTR)); assertEquals(4, new DataLayout("i386-unknown-linux").getAlignment(new StructureType(I32, I16, I8))); assertEquals(4, new DataLayout("i386-unknown-linux").getAlignment(new StructureType(I8, I32))); assertEquals(8, new DataLayout("x86_64-unknown-linux").getAlignment(new StructureType(I8, I64))); assertEquals(8, new DataLayout("x86_64-unknown-linux").getAlignment(DOUBLE)); assertEquals(4, new DataLayout("i386-unknown-linux").getAlignment(I64)); assertEquals(8, new DataLayout("x86_64-unknown-linux").getAlignment(I64)); }
public int getAlignment(Type type) { return runTypeQuery(type, new TypeCallback<Integer>() { Integer doWithType(TargetMachine targetMachine, org.robovm.llvm.Type type) { return targetMachine.getDataLayout().getABITypeAlignment(type); } }); }
DataLayout { public int getAlignment(Type type) { return runTypeQuery(type, new TypeCallback<Integer>() { Integer doWithType(TargetMachine targetMachine, org.robovm.llvm.Type type) { return targetMachine.getDataLayout().getABITypeAlignment(type); } }); } }
DataLayout { public int getAlignment(Type type) { return runTypeQuery(type, new TypeCallback<Integer>() { Integer doWithType(TargetMachine targetMachine, org.robovm.llvm.Type type) { return targetMachine.getDataLayout().getABITypeAlignment(type); } }); } DataLayout(String triple); }
DataLayout { public int getAlignment(Type type) { return runTypeQuery(type, new TypeCallback<Integer>() { Integer doWithType(TargetMachine targetMachine, org.robovm.llvm.Type type) { return targetMachine.getDataLayout().getABITypeAlignment(type); } }); } DataLayout(String triple); int getAllocSize(Type type); int getAlignment(Type type); int getStoreSize(Type type); int getOffsetOfElement(StructureType type, int idx); }
DataLayout { public int getAlignment(Type type) { return runTypeQuery(type, new TypeCallback<Integer>() { Integer doWithType(TargetMachine targetMachine, org.robovm.llvm.Type type) { return targetMachine.getDataLayout().getABITypeAlignment(type); } }); } DataLayout(String triple); int getAllocSize(Type type); int getAlignment(Type type); int getStoreSize(Type type); int getOffsetOfElement(StructureType type, int idx);  }