Skip to content

Commit dc385c2

Browse files
Rename method to getFreshGEQ
1 parent bbf87f4 commit dc385c2

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

clang/include/clang/CConv/Constraints.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -592,9 +592,10 @@ class Constraints {
592592
PersistentSourceLoc *PL, bool isCheckedConstraint = true);
593593
Implies *createImplies(Geq *Premise, Geq *Conclusion);
594594

595-
VarAtom * getVarGEQ(std::string Name, VarAtom::VarKind VK, ConstAtom *Con,
596-
std::string Rsn = DEFAULT_REASON,
597-
PersistentSourceLoc *PSL = nullptr);
595+
VarAtom *createFreshGEQ(std::string Name, VarAtom::VarKind VK, ConstAtom *Con,
596+
std::string Rsn = DEFAULT_REASON,
597+
PersistentSourceLoc *PSL = nullptr);
598+
598599
VarAtom *getFreshVar(std::string Name, VarAtom::VarKind VK);
599600
VarAtom *getOrCreateVar(ConstraintKey V, std::string Name,
600601
VarAtom::VarKind VK);

clang/lib/CConv/ConstraintVariables.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ PointerVariableConstraint *
4646
PointerVariableConstraint::getWildPVConstraint(Constraints &CS,
4747
const std::string &Rsn,
4848
PersistentSourceLoc *PSL) {
49-
VarAtom *VA = CS.getVarGEQ("wildvar", VarAtom::V_Other,
50-
CS.getWild(), Rsn, PSL);
49+
VarAtom *VA = CS.createFreshGEQ("wildvar", VarAtom::V_Other,
50+
CS.getWild(), Rsn, PSL);
5151
CAtoms NewAtoms = {VA};
5252
PVConstraint *WildPVC = new PVConstraint(NewAtoms, "unsigned", "wildvar",
5353
nullptr, false, false, "");
@@ -230,7 +230,7 @@ PointerVariableConstraint::PointerVariableConstraint(const QualType &QT,
230230
if (isVarArgType(TyName)) {
231231
// Variable number of arguments. Make it WILD.
232232
std::string Rsn = "Variable number of arguments.";
233-
VarAtom *WildVA = CS.getVarGEQ(Npre + N, VK, CS.getWild(), Rsn);
233+
VarAtom *WildVA = CS.createFreshGEQ(Npre + N, VK, CS.getWild(), Rsn);
234234
vars.push_back(WildVA);
235235
VarCreated = true;
236236
break;

clang/lib/CConv/Constraints.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -581,9 +581,9 @@ VarAtom *Constraints::getVar(ConstraintKey V) const {
581581
// Constructs a fresh VarAtom constrained GEQ the specified constant atom. This
582582
// should generally be used instead of using constant atoms directly if the the
583583
// VarAtom will be used in the variables vector of a PVConstraint.
584-
VarAtom *Constraints::getVarGEQ(std::string Name, VarAtom::VarKind VK,
585-
ConstAtom *Con, std::string Rsn,
586-
PersistentSourceLoc *PSL) {
584+
VarAtom *Constraints::createFreshGEQ(std::string Name, VarAtom::VarKind VK,
585+
ConstAtom *Con, std::string Rsn,
586+
PersistentSourceLoc *PSL) {
587587
VarAtom *VA = getFreshVar(Name, VK);
588588
addConstraint(createGeq(VA, Con, Rsn, PSL));
589589
return VA;

0 commit comments

Comments
 (0)