File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1605,6 +1605,23 @@ unsigned BindingSet::getNumViableLiteralBindings() const {
16051605 });
16061606}
16071607
1608+ // / Return string for atomic literal kinds (integer, string, & boolean) for
1609+ // / printing in debug output.
1610+ static std::string getAtomLiteralAsString (ExprKind EK) {
1611+ #define ENTRY (Kind, String ) \
1612+ case ExprKind::Kind: \
1613+ return String
1614+ switch (EK) {
1615+ ENTRY (IntegerLiteral, " integer" );
1616+ ENTRY (StringLiteral, " string" );
1617+ ENTRY (BooleanLiteral, " boolean" );
1618+ ENTRY (NilLiteral, " nil" );
1619+ default :
1620+ return " " ;
1621+ }
1622+ #undef ENTRY
1623+ }
1624+
16081625void BindingSet::dump (TypeVariableType *typeVar, llvm::raw_ostream &out,
16091626 unsigned indent) const {
16101627 out.indent (indent);
You can’t perform that action at this time.
0 commit comments