@@ -78,13 +78,20 @@ class ConstantData : public Constant {
78
78
// / Class for constant integers.
79
79
class ConstantInt final : public ConstantData {
80
80
friend class Constant ;
81
+ friend class ConstantVector ;
81
82
82
83
APInt Val;
83
84
84
85
ConstantInt (Type *Ty, const APInt &V);
85
86
86
87
void destroyConstantImpl ();
87
88
89
+ // / Return a ConstantInt with the specified value and an implied Type. The
90
+ // / type is the vector type whose integer element type corresponds to the bit
91
+ // / width of the value.
92
+ static ConstantInt *get (LLVMContext &Context, ElementCount EC,
93
+ const APInt &V);
94
+
88
95
public:
89
96
ConstantInt (const ConstantInt &) = delete ;
90
97
@@ -123,12 +130,6 @@ class ConstantInt final : public ConstantData {
123
130
// / type is the integer type that corresponds to the bit width of the value.
124
131
static ConstantInt *get (LLVMContext &Context, const APInt &V);
125
132
126
- // / Return a ConstantInt with the specified value and an implied Type. The
127
- // / type is the vector type whose integer element type corresponds to the bit
128
- // / width of the value.
129
- static ConstantInt *get (LLVMContext &Context, ElementCount EC,
130
- const APInt &V);
131
-
132
133
// / Return a ConstantInt constructed from the string strStart with the given
133
134
// / radix.
134
135
static ConstantInt *get (IntegerType *Ty, StringRef Str, uint8_t Radix);
@@ -265,13 +266,20 @@ class ConstantInt final : public ConstantData {
265
266
// /
266
267
class ConstantFP final : public ConstantData {
267
268
friend class Constant ;
269
+ friend class ConstantVector ;
268
270
269
271
APFloat Val;
270
272
271
273
ConstantFP (Type *Ty, const APFloat &V);
272
274
273
275
void destroyConstantImpl ();
274
276
277
+ // / Return a ConstantFP with the specified value and an implied Type. The
278
+ // / type is the vector type whose element type has the same floating point
279
+ // / semantics as the value.
280
+ static ConstantFP *get (LLVMContext &Context, ElementCount EC,
281
+ const APFloat &V);
282
+
275
283
public:
276
284
ConstantFP (const ConstantFP &) = delete ;
277
285
@@ -287,8 +295,6 @@ class ConstantFP final : public ConstantData {
287
295
288
296
static Constant *get (Type *Ty, StringRef Str);
289
297
static ConstantFP *get (LLVMContext &Context, const APFloat &V);
290
- static ConstantFP *get (LLVMContext &Context, ElementCount EC,
291
- const APFloat &V);
292
298
static Constant *getNaN (Type *Ty, bool Negative = false ,
293
299
uint64_t Payload = 0 );
294
300
static Constant *getQNaN (Type *Ty, bool Negative = false ,
0 commit comments