Skip to content

Commit c5c7fde

Browse files
committed
Make default specs local to cpp file
1 parent 384ff1a commit c5c7fde

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

llvm/include/llvm/IR/DataLayout.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,6 @@ class DataLayout {
135135
// FIXME: `unsigned char` truncates the value parsed by `parseSpecifier`.
136136
SmallVector<unsigned char, 8> LegalIntWidths;
137137

138-
// Default primitive type specifications.
139-
static const LayoutAlignElem DefaultIntSpecs[];
140-
static const LayoutAlignElem DefaultFloatSpecs[];
141-
static const LayoutAlignElem DefaultVectorSpecs[];
142-
143-
// Default pointer type specifications.
144-
static const PointerAlignElem DefaultPointerSpecs[];
145-
146138
// Primitive type specifications. Sorted and uniqued by type bit width.
147139
SmallVector<LayoutAlignElem, 6> IntAlignments;
148140
SmallVector<LayoutAlignElem, 4> FloatAlignments;

llvm/lib/IR/DataLayout.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,26 +200,26 @@ const char *DataLayout::getManglingComponent(const Triple &T) {
200200

201201
// Default primitive type specifications.
202202
// NOTE: These arrays must be sorted by type bit width.
203-
constexpr LayoutAlignElem DataLayout::DefaultIntSpecs[] = {
203+
constexpr LayoutAlignElem DefaultIntSpecs[] = {
204204
{1, Align::Constant<1>(), Align::Constant<1>()}, // i1:8:8
205205
{8, Align::Constant<1>(), Align::Constant<1>()}, // i8:8:8
206206
{16, Align::Constant<2>(), Align::Constant<2>()}, // i16:16:16
207207
{32, Align::Constant<4>(), Align::Constant<4>()}, // i32:32:32
208208
{64, Align::Constant<4>(), Align::Constant<8>()}, // i64:32:64
209209
};
210-
constexpr LayoutAlignElem DataLayout::DefaultFloatSpecs[] = {
210+
constexpr LayoutAlignElem DefaultFloatSpecs[] = {
211211
{16, Align::Constant<2>(), Align::Constant<2>()}, // f16:16:16
212212
{32, Align::Constant<4>(), Align::Constant<4>()}, // f32:32:32
213213
{64, Align::Constant<8>(), Align::Constant<8>()}, // f64:64:64
214214
{128, Align::Constant<16>(), Align::Constant<16>()}, // f128:128:128
215215
};
216-
constexpr LayoutAlignElem DataLayout::DefaultVectorSpecs[] = {
216+
constexpr LayoutAlignElem DefaultVectorSpecs[] = {
217217
{64, Align::Constant<8>(), Align::Constant<8>()}, // v64:64:64
218218
{128, Align::Constant<16>(), Align::Constant<16>()}, // v128:128:128
219219
};
220220

221221
// Default pointer type specifications.
222-
constexpr PointerAlignElem DataLayout::DefaultPointerSpecs[] = {
222+
constexpr PointerAlignElem DefaultPointerSpecs[] = {
223223
{0, 64, Align::Constant<8>(), Align::Constant<8>(), 64} // p0:64:64:64:64
224224
};
225225

0 commit comments

Comments
 (0)