diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-03-07 01:58:44 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-03-07 01:58:44 +0000 |
commit | 946e2726f91c17574d248f9c4b3eeea41e892a22 (patch) | |
tree | dba90d0b7abc17149dcc6ee9dab9357542a332a7 /test/CodeGenCXX/const-init-cxx11.cpp | |
parent | bef35c91b594f66216f4aab303b71a6c5ab7abcf (diff) |
Don't even try to directly emit the value of a DeclRefExpr if that declaration
is not usable in a constant expression. ~2.5% speedup on 403.gcc / combine.c.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152193 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/const-init-cxx11.cpp')
-rw-r--r-- | test/CodeGenCXX/const-init-cxx11.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/CodeGenCXX/const-init-cxx11.cpp b/test/CodeGenCXX/const-init-cxx11.cpp index a1486c1175..8d92b81feb 100644 --- a/test/CodeGenCXX/const-init-cxx11.cpp +++ b/test/CodeGenCXX/const-init-cxx11.cpp @@ -370,7 +370,7 @@ namespace InitFromConst { const bool b = true; const int n = 5; - const double d = 4.3; + constexpr double d = 4.3; struct S { int n = 7; S *p = 0; }; constexpr S s = S(); |