commit | 946e2726f91c17574d248f9c4b3eeea41e892a22 | [log] [tgz] |
---|---|---|
author | Richard Smith <richard-llvm@metafoo.co.uk> | Wed Mar 07 01:58:44 2012 +0000 |
committer | Richard Smith <richard-llvm@metafoo.co.uk> | Wed Mar 07 01:58:44 2012 +0000 |
tree | dba90d0b7abc17149dcc6ee9dab9357542a332a7 | |
parent | bef35c91b594f66216f4aab303b71a6c5ab7abcf [diff] [blame] |
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
diff --git a/test/CodeGenCXX/const-init-cxx11.cpp b/test/CodeGenCXX/const-init-cxx11.cpp index a1486c1..8d92b81 100644 --- a/test/CodeGenCXX/const-init-cxx11.cpp +++ b/test/CodeGenCXX/const-init-cxx11.cpp
@@ -370,7 +370,7 @@ 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();