@@ -84,7 +84,7 @@ class ConstraintVariable {
84
84
// the name of the variable, false for just the type.
85
85
// The 'forIType' parameter is true when the generated string is expected
86
86
// to be used inside an itype.
87
- virtual std::string mkString (const EnvironmentMap &E , bool EmitName = true ,
87
+ virtual std::string mkString (Constraints &CS , bool EmitName = true ,
88
88
bool ForItype = false , bool EmitPointee = false ,
89
89
bool UnmaskTypedef = false ) const = 0;
90
90
@@ -399,7 +399,7 @@ class PointerVariableConstraint : public ConstraintVariable {
399
399
400
400
std::string gatherQualStrings (void ) const ;
401
401
402
- std::string mkString (const EnvironmentMap &E , bool EmitName = true ,
402
+ std::string mkString (Constraints &CS , bool EmitName = true ,
403
403
bool ForItype = false , bool EmitPointee = false ,
404
404
bool UnmaskTypedef = false ) const override ;
405
405
@@ -470,9 +470,15 @@ class FVComponentVariable {
470
470
471
471
void mergeDeclaration (FVComponentVariable *From, ProgramInfo &I,
472
472
std::string &ReasonFailed);
473
- std::string mkItypeStr (const EnvironmentMap &E) const ;
474
- std::string mkTypeStr (const EnvironmentMap &E, bool EmitName) const ;
475
- std::string mkString (const EnvironmentMap &E) const ;
473
+ std::string mkItypeStr (Constraints &CS) const ;
474
+ std::string mkTypeStr (Constraints &CS, bool EmitName) const ;
475
+ std::string mkString (Constraints &CS) const ;
476
+
477
+ bool hasItypeSolution (Constraints &CS) const ;
478
+ bool hasCheckedSolution (Constraints &CS) const ;
479
+
480
+ PVConstraint *getInternal () const { return InternalConstraint; }
481
+ PVConstraint *getExternal () const { return ExternalConstraint; }
476
482
};
477
483
478
484
// Constraints on a function type. Also contains a 'name' parameter for
@@ -524,6 +530,10 @@ class FunctionVariableConstraint : public ConstraintVariable {
524
530
return ReturnVar.InternalConstraint ;
525
531
}
526
532
533
+ const FVComponentVariable *getCombineReturn () const {
534
+ return &ReturnVar;
535
+ }
536
+
527
537
size_t numParams () const { return ParamVars.size (); }
528
538
529
539
bool hasProtoType () const { return Hasproto; }
@@ -548,6 +558,11 @@ class FunctionVariableConstraint : public ConstraintVariable {
548
558
return ParamVars.at (I).InternalConstraint ;
549
559
}
550
560
561
+ const FVComponentVariable *getCombineParam (unsigned I) const {
562
+ assert (I < ParamVars.size ());
563
+ return &ParamVars.at (I);
564
+ }
565
+
551
566
bool srcHasItype () const override ;
552
567
bool srcHasBounds () const override ;
553
568
@@ -558,7 +573,7 @@ class FunctionVariableConstraint : public ConstraintVariable {
558
573
bool solutionEqualTo (Constraints &CS, const ConstraintVariable *CV,
559
574
bool ComparePtyp = true ) const override ;
560
575
561
- std::string mkString (const EnvironmentMap &E , bool EmitName = true ,
576
+ std::string mkString (Constraints &CS , bool EmitName = true ,
562
577
bool ForItype = false , bool EmitPointee = false ,
563
578
bool UnmaskTypedef = false ) const override ;
564
579
void print (llvm::raw_ostream &O) const override ;
0 commit comments