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 | 8c029611a6714624878cfd72ecbba8ab968773ea (patch) | |
tree | 017f2d6bb9a8ff048aae0c316b2d09e24a731347 /clang/test/CodeGenCXX/const-init-cxx11.cpp | |
parent | 4a280ff48fd6194d5fe06df21b057d30af93a386 (diff) | |
download | bcm5719-llvm-8c029611a6714624878cfd72ecbba8ab968773ea.tar.gz bcm5719-llvm-8c029611a6714624878cfd72ecbba8ab968773ea.zip |
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.
llvm-svn: 152193
Diffstat (limited to 'clang/test/CodeGenCXX/const-init-cxx11.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/const-init-cxx11.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/CodeGenCXX/const-init-cxx11.cpp b/clang/test/CodeGenCXX/const-init-cxx11.cpp index a1486c11757..8d92b81feb0 100644 --- a/clang/test/CodeGenCXX/const-init-cxx11.cpp +++ b/clang/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(); |