summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCXX.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-09-09 21:33:21 +0000
committerAnders Carlsson <andersca@mac.com>2009-09-09 21:33:21 +0000
commite9766d559ba577ba8e21d450feaae88c606e0ba3 (patch)
tree1fa26363e225872ed31fc8298bb1ea66b7511b7a /clang/lib/CodeGen/CGCXX.cpp
parent572a0df0fcc077919258f4d9130ff1a9d5ad019d (diff)
downloadbcm5719-llvm-e9766d559ba577ba8e21d450feaae88c606e0ba3.tar.gz
bcm5719-llvm-e9766d559ba577ba8e21d450feaae88c606e0ba3.zip
If a cast expression needs either a conversion function or a constructor to be called, generate implicit child expressions that call them.
llvm-svn: 81383
Diffstat (limited to 'clang/lib/CodeGen/CGCXX.cpp')
-rw-r--r--clang/lib/CodeGen/CGCXX.cpp22
1 files changed, 0 insertions, 22 deletions
diff --git a/clang/lib/CodeGen/CGCXX.cpp b/clang/lib/CodeGen/CGCXX.cpp
index e311912d95f..9963a9b048b 100644
--- a/clang/lib/CodeGen/CGCXX.cpp
+++ b/clang/lib/CodeGen/CGCXX.cpp
@@ -264,28 +264,6 @@ CodeGenFunction::EmitCXXOperatorMemberCallExpr(const CXXOperatorCallExpr *E,
E->arg_begin() + 1, E->arg_end());
}
-RValue
-CodeGenFunction::EmitCXXFunctionalCastExpr(const CXXFunctionalCastExpr *E) {
- assert((E->getCastKind() == CastExpr::CK_UserDefinedConversion) &&
- "EmitCXXFunctionalCastExpr - called with wrong cast");
-
- CXXMethodDecl *MD = E->getTypeConversionMethod();
- assert(MD && "EmitCXXFunctionalCastExpr - null conversion method");
- assert(isa<CXXConversionDecl>(MD) && "EmitCXXFunctionalCastExpr - not"
- " method decl");
- const FunctionProtoType *FPT = MD->getType()->getAsFunctionProtoType();
-
- const llvm::Type *Ty =
- CGM.getTypes().GetFunctionType(CGM.getTypes().getFunctionInfo(MD),
- FPT->isVariadic());
- llvm::Constant *Callee = CGM.GetAddrOfFunction(GlobalDecl(MD), Ty);
- llvm::Value *This = EmitLValue(E->getSubExpr()).getAddress();
- RValue RV = EmitCXXMemberCall(MD, Callee, This, 0, 0);
- if (RV.isAggregate())
- RV = RValue::get(RV.getAggregateAddr());
- return RV;
-}
-
llvm::Value *CodeGenFunction::LoadCXXThis() {
assert(isa<CXXMethodDecl>(CurFuncDecl) &&
"Must be in a C++ member function decl to load 'this'");
OpenPOWER on IntegriCloud