summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-11-26 03:22:21 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-11-26 03:22:21 +0000
commitcb422f1dbec70ccf51c4625c10d42d03ab31df54 (patch)
tree34e0f465cc00580a9cc2e69f26f922cd5989684c /clang/lib/CodeGen/CodeGenModule.cpp
parent2f87c4f1a599b5c886d60ce16fbd788c6b73ca43 (diff)
downloadbcm5719-llvm-cb422f1dbec70ccf51c4625c10d42d03ab31df54.tar.gz
bcm5719-llvm-cb422f1dbec70ccf51c4625c10d42d03ab31df54.zip
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
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud