Use the more general Evaluate infrastructure for folding constant DeclRefs
instead of checking explicitly for an EnumConstantDecl. This folds references to constant integer VarDecls, which has two benefits: 1. Slightly smaller emitted code from emitting a constant instead of a load, and skipping emitting some constant globals. 2. Some code forgets to define static constant member variables; emitting a load instead of the value in that case leads to a link error. (Such programs are technically not well-formed, but in practice build with g++.) llvm-svn: 89934
Loading
Please register or sign in to comment