diff options
author | John McCall <rjmccall@apple.com> | 2010-08-22 10:59:02 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-08-22 10:59:02 +0000 |
commit | a1dee5300b3a0ad0c6e763d83d528ab0e6fc9c78 (patch) | |
tree | 2bce21ec67c8ff401bc950847fa406094f814865 /clang/lib/CodeGen/CGExprCXX.cpp | |
parent | 131d97d80923ab4a068ee8a5fc3dbed5c97bd15e (diff) | |
download | bcm5719-llvm-a1dee5300b3a0ad0c6e763d83d528ab0e6fc9c78.tar.gz bcm5719-llvm-a1dee5300b3a0ad0c6e763d83d528ab0e6fc9c78.zip |
Experiment with using first-class aggregates to represent member function
pointers. I find the resulting code to be substantially cleaner, and it
makes it very easy to use the same APIs for data member pointers (which I have
conscientiously avoided here), and it avoids a plethora of potential
inefficiencies due to excessive memory copying, but we'll have to see if it
actually works.
llvm-svn: 111776
Diffstat (limited to 'clang/lib/CodeGen/CGExprCXX.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExprCXX.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGExprCXX.cpp b/clang/lib/CodeGen/CGExprCXX.cpp index fb5414016a9..ad65b105f62 100644 --- a/clang/lib/CodeGen/CGExprCXX.cpp +++ b/clang/lib/CodeGen/CGExprCXX.cpp @@ -160,8 +160,7 @@ CodeGenFunction::EmitCXXMemberPointerCallExpr(const CXXMemberCallExpr *E, cast<CXXRecordDecl>(MPT->getClass()->getAs<RecordType>()->getDecl()); // Get the member function pointer. - llvm::Value *MemFnPtr = CreateMemTemp(MemFnExpr->getType(), "mem.fn"); - EmitAggExpr(MemFnExpr, MemFnPtr, /*VolatileDest=*/false); + llvm::Value *MemFnPtr = EmitScalarExpr(MemFnExpr); // Emit the 'this' pointer. llvm::Value *This; |