[cfe-commits] r54665 - /cfe/trunk/lib/CodeGen/CGExprScalar.cpp

Daniel Dunbar daniel at zuster.org
Mon Aug 11 20:55:35 PDT 2008


Author: ddunbar
Date: Mon Aug 11 22:55:34 2008
New Revision: 54665

URL: http://llvm.org/viewvc/llvm-project?rev=54665&view=rev
Log:
Add @selector(...) codegen support.

Modified:
    cfe/trunk/lib/CodeGen/CGExprScalar.cpp

Modified: cfe/trunk/lib/CodeGen/CGExprScalar.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprScalar.cpp?rev=54665&r1=54664&r2=54665&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprScalar.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprScalar.cpp Mon Aug 11 22:55:34 2008
@@ -134,6 +134,7 @@
     return EmitLoadOfLValue(E);
   }
   Value *VisitObjCMessageExpr(ObjCMessageExpr *E);
+  Value *VisitObjCSelectorExpr(ObjCSelectorExpr *E);
   Value *VisitObjCIvarRefExpr(ObjCIvarRefExpr *E) { return EmitLoadOfLValue(E);}
   Value *VisitArraySubscriptExpr(ArraySubscriptExpr *E);
   Value *VisitShuffleVectorExpr(ShuffleVectorExpr *E);
@@ -501,6 +502,10 @@
                                       &Args[0], Args.size());
 }
 
+Value *ScalarExprEmitter::VisitObjCSelectorExpr(ObjCSelectorExpr *E) {
+  return Runtime->GetSelector(Builder, E->getSelector());
+}
+
 Value *ScalarExprEmitter::VisitArraySubscriptExpr(ArraySubscriptExpr *E) {
   // Emit subscript expressions in rvalue context's.  For most cases, this just
   // loads the lvalue formed by the subscript expr.  However, we have to be





More information about the cfe-commits mailing list