On Sat, Nov 15, 2008 at 10:23 PM, Anders Carlsson <[EMAIL PROTECTED]> wrote:
> +      if (const Expr *LVBase = V.getLValueBase()) {
> +        llvm::Constant *Base =
> +          ConstExprEmitter(*this, CGF).EmitLValue(const_cast<Expr*>(LVBase));
> +
> +        return llvm::ConstantExpr::getGetElementPtr(Base, &Offset, 1);
> +      }

This is wrong: Offset is in bytes, and the type of the expression
isn't guaranteed to be the same as the type of the base.

-Eli
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to