graydon/rust — Issue #1417: do something more careful than eval_const_expr
Author: kevinatk
Created: 2012-01-03 06:01:46+00:00
State: open

Eval_const_expr is used in the front end in several places. This code quasi-duplicates stuff that trans should probably be doing (in Graydon's words).

Any evaluation of compile-time values likely should be moved to a pass somewhere in the middle end. I assume there is a way to get a compile-time value out of LLVM, but I'm not sure.