[cfe-commits] r64780 - in /cfe/trunk: lib/CodeGen/CGDecl.cpp lib/CodeGen/CGExprConstant.cpp lib/CodeGen/CodeGenModule.h test/CodeGen/staticinit.c
eli.friedman at gmail.com
Tue Feb 17 14:03:09 PST 2009
On Tue, Feb 17, 2009 at 10:43 AM, Daniel Dunbar <daniel at zuster.org> wrote:
> Author: ddunbar
> Date: Tue Feb 17 12:43:32 2009
> New Revision: 64780
> URL: http://llvm.org/viewvc/llvm-project?rev=64780&view=rev
> Change EmitConstantExpr to allow failure.
> IRgen no longer relies on isConstantInitializer, instead we just try
> to emit the constant. If that fails then in C we emit an error
> unsupported (this occurs when Sema accepted something that it doesn't
> know how to fold, and IRgen doesn't know how to emit) and in C++ we
> emit a guarded initializer.
Any such cases are bugs in isConstantInitializer/Evaluate, IMO. As I
said in PR3398, the only interesting case I know of here is pointers
cast to integers, which Evaluate doesn't handle.
More information about the cfe-commits