@@ -578,7 +578,7 @@ struct Score {
578
578
// / An AST node that can gain type information while solving.
579
579
using TypedNode =
580
580
llvm::PointerUnion3<const Expr *, const TypeLoc *,
581
- const ParamDecl *>;
581
+ const VarDecl *>;
582
582
583
583
// / Display a score.
584
584
llvm::raw_ostream &operator <<(llvm::raw_ostream &out, const Score &score);
@@ -1065,7 +1065,7 @@ class ConstraintSystem {
1065
1065
// / the types on the expression nodes.
1066
1066
llvm::DenseMap<const Expr *, TypeBase *> ExprTypes;
1067
1067
llvm::DenseMap<const TypeLoc *, TypeBase *> TypeLocTypes;
1068
- llvm::DenseMap<const ParamDecl *, TypeBase *> ParamTypes ;
1068
+ llvm::DenseMap<const VarDecl *, TypeBase *> VarTypes ;
1069
1069
llvm::DenseMap<std::pair<const KeyPathExpr *, unsigned >, TypeBase *>
1070
1070
KeyPathComponentTypes;
1071
1071
@@ -1833,8 +1833,8 @@ class ConstraintSystem {
1833
1833
} else if (auto typeLoc = node.dyn_cast <const TypeLoc *>()) {
1834
1834
TypeLocTypes[typeLoc] = type.getPointer ();
1835
1835
} else {
1836
- auto param = node.get <const ParamDecl *>();
1837
- ParamTypes[param ] = type.getPointer ();
1836
+ auto var = node.get <const VarDecl *>();
1837
+ VarTypes[var ] = type.getPointer ();
1838
1838
}
1839
1839
1840
1840
// Record the fact that we ascribed a type to this node.
@@ -1858,8 +1858,8 @@ class ConstraintSystem {
1858
1858
} else if (auto typeLoc = node.dyn_cast <const TypeLoc *>()) {
1859
1859
TypeLocTypes.erase (typeLoc);
1860
1860
} else {
1861
- auto param = node.get <const ParamDecl *>();
1862
- ParamTypes .erase (param );
1861
+ auto var = node.get <const VarDecl *>();
1862
+ VarTypes .erase (var );
1863
1863
}
1864
1864
}
1865
1865
@@ -1887,8 +1887,8 @@ class ConstraintSystem {
1887
1887
} else if (auto typeLoc = node.dyn_cast <const TypeLoc *>()) {
1888
1888
return TypeLocTypes.find (typeLoc) != TypeLocTypes.end ();
1889
1889
} else {
1890
- auto param = node.get <const ParamDecl *>();
1891
- return ParamTypes .find (param ) != ParamTypes .end ();
1890
+ auto var = node.get <const VarDecl *>();
1891
+ return VarTypes .find (var ) != VarTypes .end ();
1892
1892
}
1893
1893
}
1894
1894
@@ -1913,9 +1913,9 @@ class ConstraintSystem {
1913
1913
return TypeLocTypes.find (&L)->second ;
1914
1914
}
1915
1915
1916
- Type getType (const ParamDecl *P ) const {
1917
- assert (hasType (P ) && " Expected type to have been set!" );
1918
- return ParamTypes .find (P )->second ;
1916
+ Type getType (const VarDecl *VD ) const {
1917
+ assert (hasType (VD ) && " Expected type to have been set!" );
1918
+ return VarTypes .find (VD )->second ;
1919
1919
}
1920
1920
1921
1921
Type getType (const KeyPathExpr *KP, unsigned I) const {
0 commit comments