@@ -78,13 +78,20 @@ class ConstantData : public Constant {
7878// / Class for constant integers.
7979class ConstantInt final : public ConstantData {
8080 friend class Constant ;
81+ friend class ConstantVector ;
8182
8283 APInt Val;
8384
8485 ConstantInt (Type *Ty, const APInt &V);
8586
8687 void destroyConstantImpl ();
8788
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+
8895public:
8996 ConstantInt (const ConstantInt &) = delete ;
9097
@@ -123,12 +130,6 @@ class ConstantInt final : public ConstantData {
123130 // / type is the integer type that corresponds to the bit width of the value.
124131 static ConstantInt *get (LLVMContext &Context, const APInt &V);
125132
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-
132133 // / Return a ConstantInt constructed from the string strStart with the given
133134 // / radix.
134135 static ConstantInt *get (IntegerType *Ty, StringRef Str, uint8_t Radix);
@@ -265,13 +266,20 @@ class ConstantInt final : public ConstantData {
265266// /
266267class ConstantFP final : public ConstantData {
267268 friend class Constant ;
269+ friend class ConstantVector ;
268270
269271 APFloat Val;
270272
271273 ConstantFP (Type *Ty, const APFloat &V);
272274
273275 void destroyConstantImpl ();
274276
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+
275283public:
276284 ConstantFP (const ConstantFP &) = delete ;
277285
@@ -287,8 +295,6 @@ class ConstantFP final : public ConstantData {
287295
288296 static Constant *get (Type *Ty, StringRef Str);
289297 static ConstantFP *get (LLVMContext &Context, const APFloat &V);
290- static ConstantFP *get (LLVMContext &Context, ElementCount EC,
291- const APFloat &V);
292298 static Constant *getNaN (Type *Ty, bool Negative = false ,
293299 uint64_t Payload = 0 );
294300 static Constant *getQNaN (Type *Ty, bool Negative = false ,
0 commit comments