
Currently, it is impossible to specify a DataLayout with pointer size and index size that is not a whole number of bytes. This patch modifies the DataLayout class to accept arbitrary pointer sizes and to store the size as a number of bits, rather than as a number of bytes. Generally speaking, the external interface of the class as used by in-tree architectures remains the same and shouldn't affect the behavior of architecures with pointer sizes equal to a whole number of bytes. Note the interface of setPointerAlignment has changed and takes a pointer and index size that is a number of bits, rather than a number of bytes. Patch originally by Ajit Kumar Agarwal Differential Revision: https://reviews.llvm.org/D114141
3 lines
114 B
LLVM
3 lines
114 B
LLVM
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
|
|
target datalayout = "p:52:64"
|
|
; CHECK: target datalayout = "p:52:64" |