[cfe-commits] r74299 - in /cfe/trunk: lib/AST/ExprConstant.cpp test/Sema/ext_vector_components.c

Eli Friedman eli.friedman at gmail.com
Sat Jun 27 18:07:43 PDT 2009


On Fri, Jun 26, 2009 at 11:22 AM, Nate Begeman<natebegeman at mac.com> wrote:
> -  return APValue();
> +  if (Result.isInt() || Result.isFloat()) {
> +    unsigned NumElts = E->getType()->getAsVectorType()->getNumElements();
> +    llvm::SmallVector<APValue, 4> Elts(NumElts, Result);
> +    Result = APValue(&Elts[0], Elts.size());
> +  }
> +  return Result;
>  }

Is there a missing conversion from the scalar type of the result to
the element type of the vector?

-Eli




More information about the cfe-commits mailing list