Simplify IsAssignable to only support one assignable var.

Now that ternaries are no longer supported for assignment (as per GLSL
spec), there's no longer any cases where an assignment can target more
than one variable reference at a time. Replace the output vector of
VariableReferences `assignedVars` with a single VariableReference,
`assignedVar`.

Also, allow callers to pass null for the ErrorReporter. This is useful
if inability to assign to an expression does not actually indicate an
error condition.

Change-Id: I146a9d1a488131ac5048c665e4dc880d895a275a
Bug: skia:10767
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319859
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
diff --git a/src/sksl/SkSLIRGenerator.cpp b/src/sksl/SkSLIRGenerator.cpp
index f1f5ad7..625ba41 100644
--- a/src/sksl/SkSLIRGenerator.cpp
+++ b/src/sksl/SkSLIRGenerator.cpp
@@ -2811,12 +2811,12 @@
 }
 
 bool IRGenerator::setRefKind(Expression& expr, VariableReference::RefKind kind) {
-    std::vector<VariableReference*> assignableVars;
-    if (!Analysis::IsAssignable(expr, &assignableVars, fErrors)) {
+    VariableReference* assignableVar = nullptr;
+    if (!Analysis::IsAssignable(expr, &assignableVar, &fErrors)) {
         return false;
     }
-    for (VariableReference* v : assignableVars) {
-        v->setRefKind(kind);
+    if (assignableVar) {
+        assignableVar->setRefKind(kind);
     }
     return true;
 }