diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-06-14 03:07:01 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-06-14 03:07:01 +0000 |
| commit | a509f2fdfa8ffb4ce9edaee84daca44bcb07ee78 (patch) | |
| tree | a4443f45f9d76e9fbc4dd2543d6f023e49eb3f4c /clang/lib/AST/ExprConstant.cpp | |
| parent | 18db1f2f1a0b05ba97c92f0ef2c4b4be8614ae9b (diff) | |
| download | bcm5719-llvm-a509f2fdfa8ffb4ce9edaee84daca44bcb07ee78.tar.gz bcm5719-llvm-a509f2fdfa8ffb4ce9edaee84daca44bcb07ee78.zip | |
Emit initializers for static-storage-duration temporaries as constants where
possible.
llvm-svn: 183967
Diffstat (limited to 'clang/lib/AST/ExprConstant.cpp')
| -rw-r--r-- | clang/lib/AST/ExprConstant.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index 96550f989ad..86dcbd04e71 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -4093,6 +4093,7 @@ bool LValueExprEvaluator::VisitMaterializeTemporaryExpr( APValue *Value; if (E->getStorageDuration() == SD_Static) { Value = Info.Ctx.getMaterializedTemporaryValue(E, true); + *Value = APValue(); Result.set(E); } else { Value = &Info.CurrentCall->Temporaries[E]; |

