diff options
| author | Eli Friedman <eli.friedman@gmail.com> | 2009-11-18 09:41:26 +0000 | 
|---|---|---|
| committer | Eli Friedman <eli.friedman@gmail.com> | 2009-11-18 09:41:26 +0000 | 
| commit | acfb1dfa4dd3eabeee6d40a08dc0003d415d6ccf (patch) | |
| tree | 26fdba3434bab5432d9516274aac1412bd6d66b4 | |
| parent | 5cebab12d5f555d4c5c298f13ea4a2ff57a7b386 (diff) | |
| download | bcm5719-llvm-acfb1dfa4dd3eabeee6d40a08dc0003d415d6ccf.tar.gz bcm5719-llvm-acfb1dfa4dd3eabeee6d40a08dc0003d415d6ccf.zip  | |
Minor cleanup to member pointer handling.
llvm-svn: 89201
| -rw-r--r-- | clang/lib/CodeGen/CGExprScalar.cpp | 10 | 
1 files changed, 3 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp index 5d5cd739a6b..e9bbf35fcd8 100644 --- a/clang/lib/CodeGen/CGExprScalar.cpp +++ b/clang/lib/CodeGen/CGExprScalar.cpp @@ -348,6 +348,9 @@ public:    Value *VisitBinLOr        (const BinaryOperator *E);    Value *VisitBinComma      (const BinaryOperator *E); +  Value *VisitBinPtrMemD(const Expr *E) { return EmitLoadOfLValue(E); } +  Value *VisitBinPtrMemI(const Expr *E) { return EmitLoadOfLValue(E); } +    // Other Operators.    Value *VisitBlockExpr(const BlockExpr *BE);    Value *VisitConditionalOperator(const ConditionalOperator *CO); @@ -539,13 +542,6 @@ EmitComplexToScalarConversion(CodeGenFunction::ComplexPairTy Src,  //===----------------------------------------------------------------------===//  Value *ScalarExprEmitter::VisitExpr(Expr *E) { -  if (const BinaryOperator *BExpr = dyn_cast<BinaryOperator>(E)) -    if (BExpr->getOpcode() == BinaryOperator::PtrMemD) { -      LValue LV = CGF.EmitPointerToDataMemberBinaryExpr(BExpr); -      Value *InVal = CGF.EmitLoadOfLValue(LV, E->getType()).getScalarVal(); -      return InVal; -    } -      CGF.ErrorUnsupported(E, "scalar expression");    if (E->getType()->isVoidType())      return 0;  | 

