private DataType getPaddingDataType(int nextComponentOffset, int structLen) {

		if (largestPrimitiveSize <= 1) {
			return new CharDataType(dataTypeManager);
		}

		for (int paddingSize = largestPrimitiveSize; paddingSize > 1; --paddingSize) {
			DataType paddingDt =
				AbstractIntegerDataType.getSignedDataType(paddingSize, dataTypeManager);
			int alignedOffset =
				DataOrganizationImpl.getAlignedOffset(paddingDt.getAlignment(), structLen);
			if ((alignedOffset + paddingSize) <= nextComponentOffset) {
				return paddingDt;
			}
		}
		return new CharDataType(dataTypeManager);
	}
Insert minimal padding into structure prior to the addition of a component such that packing
will allow component to be placed at intended offset.
@param nextComponentOffset
@param dt
Ghidra/Features/PDB/src/main/java/ghidra/app/util/bin/format/pdb/DefaultCompositeMember.java