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++.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89934
91177308-0d34-0410-b5e6-
96231b3b80d8