summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDeclCXX.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-06-12 23:38:09 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-06-12 23:38:09 +0000
commita1c9d4d9325de9c6e12aea4c02f4c15aa0615bf2 (patch)
treea9757beb8bbd90ed01eafee161a6c6b5c25af6d7 /clang/lib/CodeGen/CGDeclCXX.cpp
parent0603bbb53c53c2670695a68c1d3b7b9970de1795 (diff)
downloadbcm5719-llvm-a1c9d4d9325de9c6e12aea4c02f4c15aa0615bf2.tar.gz
bcm5719-llvm-a1c9d4d9325de9c6e12aea4c02f4c15aa0615bf2.zip
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. llvm-svn: 183875
Diffstat (limited to 'clang/lib/CodeGen/CGDeclCXX.cpp')
-rw-r--r--clang/lib/CodeGen/CGDeclCXX.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGDeclCXX.cpp b/clang/lib/CodeGen/CGDeclCXX.cpp
index 9ffcff27662..d61755c0804 100644
--- a/clang/lib/CodeGen/CGDeclCXX.cpp
+++ b/clang/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);
}
OpenPOWER on IntegriCloud