diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-06-12 23:38:09 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-06-12 23:38:09 +0000 |
| commit | d4ec562b3aaf50ea9015f82c96ebfd05a35fc7ef (patch) | |
| tree | b2f5a0dcd8f4ec05fc5387d6116addeb44316d20 /lib/CodeGen/CGDeclCXX.cpp | |
| parent | d3ff325a8d95a58783a3ea2675e2d59a393bd637 (diff) | |
| download | clang-d4ec562b3aaf50ea9015f82c96ebfd05a35fc7ef.tar.gz clang-d4ec562b3aaf50ea9015f82c96ebfd05a35fc7ef.tar.bz2 clang-d4ec562b3aaf50ea9015f82c96ebfd05a35fc7ef.tar.xz | |
Simplify: we don't need any special-case lifetime extension when initializing
declarations of reference type; they're handled by the general case handling of
MaterializeTemporaryExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183875 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDeclCXX.cpp')
| -rw-r--r-- | lib/CodeGen/CGDeclCXX.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGDeclCXX.cpp b/lib/CodeGen/CGDeclCXX.cpp index 9ffcff2766..d61755c080 100644 --- a/lib/CodeGen/CGDeclCXX.cpp +++ b/lib/CodeGen/CGDeclCXX.cpp @@ -149,7 +149,7 @@ void CodeGenFunction::EmitCXXGlobalVarDeclInit(const VarDecl &D, assert(PerformInit && "cannot have constant initializer which needs " "destruction for reference"); unsigned Alignment = getContext().getDeclAlign(&D).getQuantity(); - RValue RV = EmitReferenceBindingToExpr(Init, &D); + RValue RV = EmitReferenceBindingToExpr(Init); EmitStoreOfScalar(RV.getScalarVal(), DeclPtr, false, Alignment, T); } |
