aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCXX.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-12-18 17:29:21 +0000
committerAnders Carlsson <andersca@mac.com>2009-12-18 17:29:21 +0000
commit5617bc03e2e886aafe8bdcecf0fcdeab5f3868c6 (patch)
treeb4c8b458b2b292de7705279c9a905a017c086e7d /lib/CodeGen/CGCXX.cpp
parentfc4b899563f70b2b1fc45948ebf7451f16ccfc09 (diff)
CK_UserDefinedConversion is a valid kind when doing copy ctor elision.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91695 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCXX.cpp')
-rw-r--r--lib/CodeGen/CGCXX.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp
index 011257b749..2d5b4315ad 100644
--- a/lib/CodeGen/CGCXX.cpp
+++ b/lib/CodeGen/CGCXX.cpp
@@ -580,7 +580,8 @@ CodeGenFunction::EmitCXXConstructExpr(llvm::Value *Dest,
if (const ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(Arg)) {
assert((ICE->getCastKind() == CastExpr::CK_NoOp ||
- ICE->getCastKind() == CastExpr::CK_ConstructorConversion) &&
+ ICE->getCastKind() == CastExpr::CK_ConstructorConversion ||
+ ICE->getCastKind() == CastExpr::CK_UserDefinedConversion) &&
"Unknown implicit cast kind in constructor elision");
Arg = ICE->getSubExpr();
}